Ayaz Hafiz
f10c47ec20
Update gen_abilities tests
2022-09-21 12:29:06 -05:00
Ayaz Hafiz
01815ad23f
Ability impls that don't shadow can end up resolving to the member def
2022-09-21 12:29:06 -05:00
Ayaz Hafiz
b7b0af0d45
Update solve tests
2022-09-21 12:29:06 -05:00
Ayaz Hafiz
67d0a3d36f
Symbol resolution of ability members can come from unique defs or unique shadows
2022-09-21 12:29:06 -05:00
Ayaz Hafiz
454f3634fd
Import all types from Encode by default
2022-09-21 12:29:06 -05:00
Ayaz Hafiz
7e5ff4883f
Do not qualify builtin modules with package shorthand when loading
2022-09-21 12:29:06 -05:00
Ayaz
211c297230
Merge pull request #4041 from KilianVounckx/opaque-bool
...
Opaque bool
2022-09-21 11:15:41 -05:00
Folkert de Vries
cc202a4cf9
Merge pull request #4082 from roc-lang/update-cli-platform-unreachables
...
Support unification with uninhabited tag variants in more places
2022-09-21 12:18:38 +02:00
Folkert de Vries
a74f5d9366
Merge pull request #4076 from roc-lang/collapse-void-2
...
Unwrap layouts containing void layouts as newtypes
2022-09-21 00:13:56 +02:00
Ayaz
362dadc7e9
Merge pull request #4073 from roc-lang/i4068
...
Construct exhaustiveness branches with condition, not branch, variable
2022-09-20 17:03:33 -05:00
Ayaz Hafiz
0bcbc065c2
Update wasm-str tests
2022-09-20 14:53:46 -05:00
Ayaz Hafiz
d88452e3d2
Update parse tests
2022-09-20 14:45:52 -05:00
Ayaz Hafiz
fd7b4ec9fc
Turn off gen-dev test for now
2022-09-20 14:42:09 -05:00
Ayaz Hafiz
b72ee8a68e
Attempt bool true/false impl in dev backend
2022-09-20 14:42:09 -05:00
Ayaz Hafiz
e3c91e1d4d
Can tests
2022-09-20 14:42:09 -05:00
Ayaz Hafiz
b3167ad49b
Clippy
2022-09-20 14:42:08 -05:00
Ayaz Hafiz
0abfca401a
Update mono tests
2022-09-20 14:42:08 -05:00
Ayaz Hafiz
447e1492e1
Work around symbol specializations not getting captured
2022-09-20 14:42:08 -05:00
Ayaz Hafiz
b797e9c0c8
Admit non-trivial holes
2022-09-20 14:42:08 -05:00
kilianv
222f0e8870
Fix typo
2022-09-20 14:42:08 -05:00
kilianv
08c238ff27
Generate new files in test_mono after changing to opaque bools
2022-09-20 14:42:05 -05:00
kilianv
49319a2ffe
Update Bool documentation to opaque types
2022-09-20 14:42:04 -05:00
kilianv
610c529ba8
Update roc files to use new opaque bools
2022-09-20 14:42:04 -05:00
kilianv
9717747a54
Update tests
...
not all tests pass yet. Will look at them with Ayaz.
2022-09-20 14:42:03 -05:00
kilianv
6dbebd7834
Update Bool to be opaque
2022-09-20 14:42:01 -05:00
Ayaz Hafiz
412c73c54c
Add test cases for uninhabited variant collapsing with destructure patterns
...
Closes #4080
2022-09-20 14:22: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
7f54c0fd94
FIx gen-wasm tests
2022-09-20 11:38:23 -05:00
Ayaz Hafiz
77fbc0189e
Eliminate unnecessary branch in List.roc
2022-09-20 08:43:08 -05:00
Ayaz Hafiz
2f7020aa31
Eliminate voided branches only after resolving their bodies' specializations
2022-09-20 08:35:10 -05:00
Ayaz
da75f55aea
Merge pull request #4069 from roc-lang/exhaustiveness-check-uninhabited
...
Don't require pattern matching branches that are uninhabited
2022-09-19 16:57:38 -05:00
Ayaz Hafiz
f41936d5e5
Unwrap layouts containing void layouts as newtypes
...
Addresses the attempt to do so in https://github.com/roc-lang/roc/pull/3465
Co-authored-by: Folkert <folkert@folkertdev.nl>
2022-09-19 16:50:49 -05:00
Folkert
639c1e5fa3
get rid of UnitWithArguments
2022-09-19 16:49:55 -05:00
Ayaz Hafiz
29244112df
Handle optional record fields in record pattern indexing
2022-09-19 13:51:16 -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
0f0e414272
Improve error message for uninhabited patterns
2022-09-19 10:55:02 -05:00
Ayaz Hafiz
147636f42b
Base reported row numbers on original rows, not reified rows
2022-09-19 10:47:35 -05:00
Ayaz Hafiz
041b91e031
Add more test cases
2022-09-19 10:45:31 -05:00
Ayaz Hafiz
be853b65c5
Support unification of extension types with uninhabited branches
2022-09-19 10:32:39 -05:00
Ayaz Hafiz
8a42d60ca2
Move inhabited check to subs module
2022-09-19 10:08:18 -05:00
Folkert de Vries
d9217caae5
Merge pull request #4048 from roc-lang/JanCVanB-patch-1
...
Fix/update path
2022-09-16 23:29:50 +02:00
Ayaz Hafiz
ac752adc7c
Check in some more work
2022-09-16 16:09:21 -05:00
Ayaz Hafiz
6adb88beee
Report uninhabited branches as redundant
2022-09-16 15:55:46 -05:00
Ayaz Hafiz
0d98abae7b
Clippy
2022-09-16 15:39:09 -05:00
Ayaz Hafiz
1d7aef8c96
Don't include uninhabited constructors in exhaustiveness checking
2022-09-16 15:36:54 -05:00
Folkert
bdec61d5bb
fix bug in expect serialization of lambda sets
2022-09-16 22:19:55 +02:00
Ayaz Hafiz
d2cc1041aa
Unused import
2022-09-16 10:25:31 -05:00
Ayaz Hafiz
a81d4d4be2
Allow any numeric range to become a float
...
Currently things like `1 / 200` lead to a miscompilation because we type
`200` (and as a result, both `1` and the division result) as a ranged
number with width >= U8. During mono that forces the number to become an
`I64` because our logic was that a ranged number can only become a float
if it's at least as wide as an I8. But this is incorrect; as long as the
type is wrapped in `Frac` constructor and it's a ranged number (and not
a ranged int), it should become a fractional type.
```
» 1 / 200
0.005 : Float *
```
Closes #4047
2022-09-16 10:05:43 -05:00
Jan Van Bruggen
063464cb12
Fix/update path
...
I don't know if this file moved, but this is where it is now.
Signed-off-by: Jan Van Bruggen <JanCVanB@users.noreply.github.com>
2022-09-15 23:29:33 -06:00