Ayaz Hafiz
42058c3067
Add note on bug in constraining
2022-10-31 09:37:41 -05:00
Folkert de Vries
02a76bb8bd
Merge pull request #4399 from roc-lang/no-types-in-constraining-api
...
Have most constraining APIs take a type index rather than `Type`
2022-10-26 19:45:55 +02:00
Ayaz Hafiz
a4d7ee33c1
Apply lints
2022-10-24 18:23:36 -05:00
Ayaz Hafiz
084393c326
store_index is now redundant
2022-10-24 18:21:05 -05:00
Ayaz Hafiz
bff3d534f6
Store expects type index
2022-10-24 18:20:18 -05:00
Ayaz Hafiz
278754506f
lookup expects type index
2022-10-24 18:14:28 -05:00
Ayaz Hafiz
97d47cc05f
includes_tag expects type index
2022-10-24 18:08:45 -05:00
Ayaz Hafiz
556222caa1
is_open_type expects type index
2022-10-24 17:51:39 -05:00
Ayaz Hafiz
0f0c02965a
pattern_presence expects type index
2022-10-24 17:49:02 -05:00
Ayaz Hafiz
0990eda0cb
equal_pattern_types takes type index
2022-10-24 17:41:13 -05:00
Ayaz Hafiz
c53e08f63c
equal_types_with_storage takes type index
2022-10-24 17:35:09 -05:00
Ayaz Hafiz
cca5f53e98
equal_types_var requires a type index
2022-10-24 17:30:04 -05:00
Ayaz Hafiz
91eb9aaea4
Rename variables
2022-10-24 14:30:50 -05:00
Ayaz Hafiz
83e35fa40d
Get rid of another clone
2022-10-24 14:29:05 -05:00
Ayaz Hafiz
0b8ac07287
Get rid of more type clones
2022-10-24 14:25:19 -05:00
Ayaz Hafiz
7c3fe5bc44
Remove some type clones
2022-10-24 14:11:53 -05:00
Ayaz Hafiz
55d7f3f658
Require type and expected indices in equal_types constraints
2022-10-24 14:05:19 -05:00
Ayaz Hafiz
6bb97c92b9
Canonicalize multiple abilities bound to a type variable
2022-10-24 13:56:07 -05:00
Ayaz Hafiz
d26e9c81e0
Resolve ability specializations looked up in expects
2022-10-17 17:56:48 -05:00
Ayaz Hafiz
8aee32830a
Add symbols' localized type variable to the AST
2022-10-17 17:35:48 -05:00
Ayaz Hafiz
20e4295eea
Make sure type variables bound to abilities are instantiated in aliases
...
Closes #4259
2022-10-14 13:56:00 -05:00
Ayaz Hafiz
54e977be2d
Constrain function type on closure type, not signature
2022-10-12 16:37:49 -05:00
Ayaz Hafiz
619cd2f629
Infer ranged number for chars in patterns
2022-10-05 17:28:01 -05:00
Ayaz Hafiz
178b634266
Treat single quote literals as ranged numbers for inference purposes
2022-10-05 17:28:00 -05:00
Ayaz Hafiz
1799d6ed0e
Construct exhaustiveness branches with condition, not branch, variable
...
Previously we would construct the shapes of unions used in the pattern
tree for exhaustiveness checking using the type of the branch patterns,
rather than the type of the condition variable. Clearly we want to
always use the condition variable, otherwise some branches will be
seen as exhaustive, when they are not!
To do this, we now index into the condition variable while refying the
patterns to build the tree for exhaustiveness checking.
Closes #4068
2022-09-19 13:37:59 -05:00
Ayaz Hafiz
42633c1f96
Span body of last branch in exhaustiveness checking
...
Closes #4028
2022-09-13 16:24:59 -04:00
Richard Feldman
3ca9202e3b
Merge pull request #3834 from roc-lang/rust-1.63-clippy
...
rust 1.63 clippy
2022-08-27 21:15:36 -04:00
Folkert
a22e04361c
Merge remote-tracking branch 'origin/main' into expect-fx-codegen
2022-08-23 16:28:21 +02:00
Folkert
6aa168ee0b
more various clippy fixes
2022-08-21 16:43:58 +02:00
Richard Feldman
7e12bcff1d
Rename variant_var to tag_union_var
2022-08-15 11:11:32 -05:00
Richard Feldman
97e2900bf5
s/rtfeldman/roc-lang/g in links to GitHub repos
2022-08-12 15:24:09 -04:00
Folkert
7e6a3ddc15
more boilerplate
2022-08-12 13:50:06 +02:00
Folkert
7c9b1897bb
fully canonicalize expect-fx
2022-08-09 14:50:24 +02:00
Anton-4
6a15a7b41b
changed Cargo versions from 0.1.0 to 0.0.1
2022-08-03 11:41:19 +02:00
Ayaz Hafiz
4657a957f7
When storing variables, merge them directly with the target rather than unifying
...
When we unify two variables that end up merged, the rank of the
resulting content is the lower of the two variables being merged. But
during storage, we really do mean, take the target descriptor of the
type we're merging against, and don't try to lower to a
possibly-generalized rank! This fixes a couple bugs I didn't even
realize were present!
2022-07-29 14:53:14 -04:00
Ayaz Hafiz
4049eb6780
Remove unused OpportunisticResolve field
2022-07-29 08:43:19 -04:00
Folkert de Vries
d212dffa1a
Merge pull request #3616 from rtfeldman/i3614
...
Compile branches in the presence of degenerate patterns
2022-07-25 19:45:36 +02:00
Ayaz Hafiz
4031770836
Mark branch patterns degenerate when they don't bind symbols body needs
2022-07-22 17:26:45 -04:00
Ayaz Hafiz
a03cf85529
Add a datatype
2022-07-22 13:02:22 -04:00
Ayaz Hafiz
13b0ce7ca0
Make sure to apply "is-open" constraints at the very end of pattern constraining
...
Closes #3298
2022-07-22 12:57:27 -04:00
Richard Feldman
b7d78d9237
Merge pull request #3598 from rtfeldman/i3558
...
Compile variables bound in multiple patterns of a branch, and detect unbound patterns
2022-07-21 16:45:52 -04:00
Ayaz Hafiz
78dc82867a
Report errors for identifiers not bound in all patterns of a branch
2022-07-21 12:15:05 -04:00
Ayaz Hafiz
ce8b50caea
Support bound variables in multiple patterns
2022-07-21 11:40:09 -04:00
Richard Feldman
3972664e48
Rename Category::Float to Category::Frac
2022-07-20 10:49:05 -04:00
Ayaz Hafiz
f1a6ea6a40
Typecheck and compile opaque wrapping functions
...
This enables you to write something like
```
A := U8
List.map [1, 2, 3] @A
```
which will be compiled as if it was `List.map [1, 2, 3] \x -> @A x`.
Closes #3499
2022-07-12 18:38:03 -04:00
Richard Feldman
f5fac8230f
Prune some unused dependencies
2022-07-11 20:51:41 -04:00
Ayaz Hafiz
b04f704b99
Remove constrain_builtin_imports
2022-07-10 10:46:18 -04:00
Ayaz
7b308d9efe
Merge pull request #3404 from rtfeldman/ambient-lset-specialization
...
The ambient lambda set specialization algorithm
2022-07-09 17:23:27 -05:00
Ayaz Hafiz
808d19b01b
Correctly compile unified recursive tag unions
2022-07-08 17:35:14 -04:00
Ayaz Hafiz
5d74a376af
Attach ambient function vars to lambda sets
2022-07-06 13:04:29 -04:00