Ayaz Hafiz
bef9b54124
Avoid parsing doc comments as code
2022-11-16 14:05:53 -06:00
Ayaz Hafiz
2cba520839
Document fixpoint fixing algorithm
2022-11-16 14:05:51 -06:00
Ayaz Hafiz
8414c8e2de
Remove unneeded comments
2022-11-16 14:05:51 -06:00
Ayaz Hafiz
5a92947326
Use fixpoint-fixing in unification
2022-11-16 14:05:51 -06:00
Ayaz Hafiz
3c968b581d
Check in fixpoint-fixing algorithm
2022-11-16 14:05:51 -06:00
Ayaz Hafiz
fb643758bb
Remove Unified BadType
2022-11-08 14:11:25 -06:00
Ayaz Hafiz
09748aec48
Remove problems from error type API surface
2022-11-08 14:11:25 -06:00
Luke Boswell
a3f901427a
correct formatting and removed duplicate image
2022-11-03 20:02:10 +11:00
Luke Boswell
f3bdb5f321
updating rust package documentation
2022-11-03 20:00:06 +11:00
Ayaz Hafiz
a58d128d9e
Cover mode when unifying variable slices
2022-11-01 12:06:59 -05:00
Ayaz Hafiz
debe6332c5
Support OIOP for type aliases
2022-10-31 09:38:21 -05:00
Ayaz Hafiz
f3623b1e47
Close extension types extended wiht uninhabited types after their extension
2022-10-31 09:37:40 -05:00
Ayaz Hafiz
4d48ea7c2f
Materialize extension variable polarity in error type reporting
2022-10-31 09:37:40 -05:00
Ayaz Hafiz
c0257302a9
Address clippy lints
2022-10-24 14:00:45 -05:00
Ayaz Hafiz
3bd10698cf
Allow rigid able to unify with flex able when rigid bounds are a superset
2022-10-24 14:00:45 -05:00
Ayaz Hafiz
9c88534758
Obligation checking layers on extra abilities bound to a variable
2022-10-24 13:59:52 -05:00
Ayaz Hafiz
db7fe48d1c
Merge muliple abilities bound to flex var
2022-10-24 13:59:52 -05:00
Ayaz Hafiz
229548571b
Represent "able" variables with slices of abilities
2022-10-24 13:59:51 -05:00
Ayaz Hafiz
0f0678ce73
s/closure_names/symbol_names/g in subs
2022-10-24 13:59:51 -05:00
Ayaz Hafiz
05e8e6de6f
Disallow typing optional fields when required fields are annotated
...
Closes #4313
2022-10-18 15:50:20 -05:00
Ayaz Hafiz
81fa0407b6
Satiate must_use reason
2022-10-12 16:38:36 -05:00
Ayaz Hafiz
f3a6b45452
Add must_use to all unification results
...
Making sure that no unspecialized lambda sets slip through the cracks!
2022-10-12 16:37:50 -05:00
Ayaz
83b64c4fb3
Merge pull request #4209 from roc-lang/impl-tag-discriminant
...
Derive `Hash` implementations for tag unions
2022-10-10 22:23:05 -05:00
Ayaz Hafiz
16f43f5768
Clippy
2022-10-05 17:25:12 -05:00
Ayaz Hafiz
06e5110aa5
Unification of multiple tag-functions
2022-10-05 17:25:11 -05:00
Ayaz Hafiz
61cf8e53e6
Have FunctionOrTagUnion include multiple possible tags
2022-10-05 17:24:52 -05:00
Ayaz Hafiz
2517695ce4
Fix deriving of hash ability for recursive tag unions
2022-10-05 12:01:02 -05:00
Ayaz Hafiz
294244ae25
Make sure flex unifies with rigid-able vars correctly
2022-10-04 14:09:40 -05:00
Ayaz Hafiz
f96c825aa4
Allow uninhabited type extension to happen on either unification side
2022-09-20 14:20:47 -05:00
Ayaz Hafiz
b0598ef817
Simplify unification with uninhabited tags to happen anytime tags are uninhabited
...
I believe this is safe! No need to gate it behind a mode.
2022-09-20 14:13:55 -05:00
Ayaz Hafiz
be853b65c5
Support unification of extension types with uninhabited branches
2022-09-19 10:32:39 -05:00
Ayaz Hafiz
086f7a7e9d
Attempt occurs checks for recursive lambda sets only during monomorphization
2022-08-31 16:45:57 -05:00
Ayaz Hafiz
ea2e5d171a
Invalidate layout-cached variables correctly after merging
2022-08-31 14:17:14 -05:00
Ayaz Hafiz
593d609c2b
Check for unifiability of lambda sets without a subs snapshot
...
Gives nice performance wins, in particular avoiding clones of
unification tables, which can grow quite large.
Closes #3940
2022-08-31 08:56:45 -05:00
Richard Feldman
97e2900bf5
s/rtfeldman/roc-lang/g in links to GitHub repos
2022-08-12 15:24:09 -04:00
Folkert de Vries
0798f787c5
Merge pull request #3736 from rtfeldman/i3687
...
Creation of a record whose type has an optional value is an error
2022-08-11 15:51:41 +02:00
Ayaz Hafiz
81bb889e93
Add RigidOptional record field variant
2022-08-10 20:24:18 -07:00
Ayaz Hafiz
86c6d339c3
Choose merged closure var based on whether it's recursive or not
2022-08-09 16:08:24 -07:00
Anton-4
6a15a7b41b
changed Cargo versions from 0.1.0 to 0.0.1
2022-08-03 11:41:19 +02:00
Folkert de Vries
a00cb58660
Merge pull request #3679 from rtfeldman/i3669
...
Choose recursion var when merging arbitrary variables, when possible
2022-08-02 22:09:50 +02:00
Folkert de Vries
86a1a0f401
Merge pull request #3643 from rtfeldman/disjoint-able-variable-specialization
...
Disjoint able variable specialization algorithm
2022-08-02 20:31:47 +02:00
Ayaz Hafiz
394a76a7cd
Remove unused arg
2022-08-02 08:15:54 -05:00
Ayaz Hafiz
fc9ff928eb
Choose non-recursion var when merging arbitrary variables, when possible.
...
Closes #3669
2022-08-02 08:15:54 -05:00
Ayaz Hafiz
a62048f799
Typo
2022-07-29 14:18:47 -04:00
Ayaz Hafiz
1851ee09f8
Add some more comments on the behavior of compaction-mode unification
2022-07-29 14:18:47 -04:00
Ayaz Hafiz
ff4b5f58ab
Avoid over-eager disjoint variable merging during lambda set compaction
...
During the unspecialized lambda set compaction procedure, we might end
up trying to merge too many disjoint variables during unspecialized
lambda unification. Avoid doing so, by checking if we're in the
compaction procedure.
2022-07-29 14:18:47 -04:00
Ayaz Hafiz
bda52b0d39
Implement unspecialized lambda set unification as list merging
2022-07-29 14:18:47 -04:00
Ayaz Hafiz
7926499900
Implement disjoint type variable handling in the lambda set specialization algorithm
...
This completes the last known hole I am aware of in the current
lambda set specialization algorithm.
Closes #3421
2022-07-29 14:18:46 -04:00
Ayaz Hafiz
1460f60ab1
Unify material recursion variables behind aliases and opaques
...
Even if there are no changes to alias arguments, and no new variables were
introduced, we may still need to unify the "actual types" of the alias or opaque!
The unification is not necessary from a types perspective (and in fact, we may want
to disable it for `roc check` later on), but it is necessary for the monomorphizer,
which expects identical types to be reflected in the same variable.
As a concrete example, consider the unification of two opaques
P := [Zero, Succ P]
(@P (Succ n)) ~ (@P (Succ o))
`P` has no arguments, and unification of the surface of `P` introduces nothing new.
But if we do not unify the types of `n` and `o`, which are recursion variables, they
will remain disjoint! Currently, the implication of this is that they will be seen
to have separate recursive memory layouts in the monomorphizer - which is no good
for our compilation model.
Closes #3653
2022-07-29 11:03:47 -04:00
Ayaz Hafiz
c0e976f544
Wrap unification subs in Env
2022-07-28 08:57:33 -04:00