Commit Graph

390 Commits

Author SHA1 Message Date
Ayaz Hafiz
6b3a4b419e
Migrate even more tests 2023-03-31 19:05:10 -05:00
Ayaz Hafiz
346e3f0dd5
Add missing file 2023-03-31 18:36:00 -05:00
Ayaz Hafiz
61adcd34d2
Migrate more tests 2023-03-31 18:35:45 -05:00
Ayaz Hafiz
32a59b7e72
Lints 2023-03-31 18:04:32 -05:00
Ayaz Hafiz
906f2349b8
Remove migrated test 2023-03-31 18:02:10 -05:00
Ayaz Hafiz
442812f7c5
Add another test 2023-03-31 18:02:01 -05:00
Ayaz Hafiz
190e436f4f
Move files 2023-03-31 17:58:24 -05:00
Ayaz Hafiz
fadd3e7e4a
Remove migrated test 2023-03-31 14:35:21 -05:00
Ayaz Hafiz
d39a329e28
Update emit header 2023-03-31 14:35:10 -05:00
Ayaz Hafiz
a10ce77584
Support printing can decls in uitest 2023-03-31 14:34:06 -05:00
Ayaz Hafiz
d891dd829f
Migrate more tests 2023-03-31 14:06:49 -05:00
Ayaz Hafiz
834f4afe2c
Add more tests 2023-03-31 13:56:46 -05:00
Ayaz Hafiz
5a9109f17b
Make uitests less noisy 2023-03-31 13:54:38 -05:00
Ayaz Hafiz
3fc54ea578
Migrate a few more tests 2023-03-31 13:45:06 -05:00
Ayaz Hafiz
54d6bf7747
Stub out the rest of uitest 2023-03-31 13:39:33 -05:00
Ayaz Hafiz
cf3fc7f4a8
Scaffold uitest 2023-03-31 12:47:13 -05:00
Ayaz Hafiz
58cef56a23
Move solve test helpers to their own crate, for now 2023-03-31 11:35:23 -05:00
Ayaz Hafiz
1227d10731
Refactor solve test helpers into a new module 2023-03-31 11:18:24 -05:00
Ayaz Hafiz
f458da0cbc
Implement Hash for Bool 2023-03-28 15:04:45 -05:00
Ayaz Hafiz
d2b9a1a33c
Improve debug printing for can decls 2023-03-27 10:10:56 -05:00
Ayaz
8c55e8126d
Merge pull request #5203 from roc-lang/virtual-dom-annotations
Fix a few bugs Virtual-DOM cropped up
2023-03-25 20:00:51 -05:00
Ayaz
1891df77b8
Merge pull request #5188 from roc-lang/i5177
Make sure openness constraint goes under tuples
2023-03-25 15:52:09 -05:00
Ayaz
61dd5cc8c7
Merge pull request #5179 from roc-lang/i5143-tuple-abilities
Implement ability obligation checking and derivation for tuples
2023-03-25 15:51:39 -05:00
Ayaz Hafiz
f37ede036a
Do not adjust rank of lambda sets under alias arguments 2023-03-25 15:21:40 -05:00
Ayaz Hafiz
1b2ee9ad30
Make sure openness constraint goes under tuples
Closes #5177
2023-03-24 14:13:14 -05:00
Ayaz Hafiz
84fa22f235
Fix solve test module 2023-03-22 17:08:43 -05:00
Ayaz Hafiz
3e83e42195
Make sure to report error rather than descending as appropriate 2023-03-22 17:08:43 -05:00
Ayaz Hafiz
3d2642b282
Stray dbg 2023-03-22 17:08:42 -05:00
Ayaz Hafiz
e6094df69b
Fast-path for determining ability member impls for builtin opaques 2023-03-22 17:08:41 -05:00
Ayaz Hafiz
297a571b34
Eq for Bool 2023-03-22 17:03:58 -05:00
Ayaz Hafiz
5be8ff700d
Derive encode for bool 2023-03-22 17:03:58 -05:00
Ayaz Hafiz
9563b444cd
Fix test 2023-03-22 17:03:57 -05:00
Ayaz Hafiz
075332ec88
Run builtin opaques and abilities through derive key 2023-03-22 17:03:57 -05:00
Ayaz Hafiz
f079e8c96b
Bool derive key for Decode 2023-03-22 17:03:57 -05:00
Ayaz Hafiz
dba72c0565
Handle builtin opaque types that implement an ability but don't explicitly list so 2023-03-22 17:03:35 -05:00
Ayaz Hafiz
8a7d9f8f23
Better debugging when lambda set region is missing 2023-03-22 11:13:00 -05:00
Ayaz Hafiz
f4f9ae7a5d
Implement obligation checking of tuples for all abilities 2023-03-22 10:03:01 -05:00
Ayaz Hafiz
e8a29d2df4
Ensure that closures inside recursive closures capture correctly
With a code like

```
thenDo = \x, callback ->
    callback x

f = \{} ->
    code = 10u16

    bf = \{} ->
        thenDo code \_ -> bf {}

    bf {}
```

The lambda `\_ -> bf {}` must capture `bf`. Previously, this would not
happen correctly, because we assumed that mutually recursive functions
(including singleton recursive functions, like `bf` here) cannot capture
themselves.

Of course, that premise does not hold in general. Instead, we should have
mutually recursive functions capture the closure (haha, get it) of
values captured by all functions constituting the mutual recursion.
Then, any nested closures can capture outer recursive closures' values
appropriately.
2023-03-20 17:44:59 -04:00
Brendan Hansknecht
f42f61e271
run a toml formatter and then clean it up a bit 2023-03-06 19:47:57 -08:00
Brendan Hansknecht
4a89bee0a5
centralize package versions except for vendor and excluded 2023-03-06 19:29:09 -08:00
Brendan Hansknecht
5485c8a5b0
update to using workspace package spec 2023-03-06 16:36:18 -08:00
Ayaz Hafiz
b406e384fc
Print recursion variables correctly in pretty printer 2023-02-13 17:42:21 -06:00
Joshua Warner
5a6be05ead
implement mono / lowering for tuples 2023-02-07 18:54:50 -08:00
Ayaz Hafiz
63e30443fd
Fix formatting 2023-01-27 17:35:31 -06:00
Ayaz Hafiz
572a666780
No Encode/Decode for Nat 2023-01-27 17:16:10 -06:00
Joshua Warner
303e5bceb3
Fix tuple accessor type printing 2023-01-22 13:22:39 -08:00
Joshua Warner
de828416bf
Initial implementation of tuples in type checking
This leaves in place a bunch of TODOs and likely many bugs - notably, I haven't tested codegen/layout at all here.
2023-01-22 12:40:44 -08:00
Ayaz
ed7123ed5b
Merge pull request #4887 from roc-lang/weakening-5
Finish weakening let-bindings
2023-01-17 12:47:12 -06:00
Ayaz Hafiz
c9460ecf3f
Rename IsImplicitOpennessVar 2023-01-16 10:52:23 -06:00
Ayaz Hafiz
5fceb9ceb7
Push implicit openness vars through 2023-01-16 10:52:23 -06:00