ayazhafiz
cf628ed4ef
Fix clippy warning
2022-02-27 12:21:20 -05:00
ayazhafiz
720b7b49d2
Improve error pattern and fix tests
2022-02-27 12:01:12 -05:00
ayazhafiz
34900c1f55
Address @rtfeldman review
2022-02-27 00:11:11 -05:00
ayazhafiz
07b1829732
Improve error reporting for patterns not matching opaques
2022-02-27 00:11:11 -05:00
ayazhafiz
059c324268
Error reporting for type mismatches involving opaques
2022-02-27 00:10:12 -05:00
ayazhafiz
822e38d026
Fix opaque reporting tests
2022-02-27 00:10:12 -05:00
ayazhafiz
ccd4963e0f
Fix clippy warnings
2022-02-27 00:10:12 -05:00
ayazhafiz
86aa0df661
Add constraint generation for opaque types
2022-02-27 00:10:11 -05:00
Richard Feldman
d3acf34415
Merge pull request #1591 from rtfeldman/single-quote-literal
...
Single Quote literal
2022-02-26 23:27:46 -05:00
Emi Simpson
40375adbb0
Merge remote-tracking branch 'upstream/trunk' into fix-panic-on-unimported-module
2022-02-25 09:18:19 -05:00
Emi Simpson
4d10c22442
🐛 ️ Handle unimported modules properly
...
helpful error, not panic!
Closes #2422
2022-02-24 20:52:25 -05:00
Brendan Hansknecht
f7c0e2ef19
Merge remote-tracking branch 'origin/trunk' into single-quote-literal
2022-02-24 10:13:39 -08:00
ayazhafiz
e420ebd023
Add TODOs for opaque type comments that will need to be changed later
2022-02-21 23:21:39 -05:00
hafiz
ca9ecbea52
Merge pull request #2533 from rtfeldman/abilities!
...
[WIP] Spike for abilities and friends
2022-02-21 23:18:40 -05:00
ayazhafiz
90de82e295
Validation of opaques during canonicalization
2022-02-21 18:25:19 -05:00
Brendan Hansknecht
74daec84df
Merge pull request #2472 from rtfeldman/add_Int.toInt_builtins
...
Add `{Int *}.to{Int *}` builtins
2022-02-21 18:03:14 +00:00
ayazhafiz
543ca97a1c
Remove spaces around var in record update
...
Closes #2534
2022-02-20 20:17:29 -05:00
ayazhafiz
6b53692aac
Canonicalize opaque types
2022-02-20 13:47:01 -05:00
ayazhafiz
6104a27b45
Parse opaque references
2022-02-19 21:30:42 -05:00
ayazhafiz
a38f1d1e8d
Fmt and clippy
2022-02-19 20:54:21 -05:00
ayazhafiz
fa24e51593
Parse opaque types
2022-02-19 18:38:31 -05:00
ayazhafiz
8ce81e4607
AliasHeader -> TypeHeader
2022-02-19 17:51:56 -05:00
ayazhafiz
13067f2908
Implement Num.toNNNChecked
...
Closes #2411
2022-02-19 16:20:21 -05:00
ayazhafiz
d90915a8cd
Implement Num.to* builtins
...
Just wrap over Num.intCast
2022-02-19 11:28:41 -05:00
Jan Van Bruggen
e12d98af98
WIP: Start adding new Int.toInt builtins
2022-02-19 11:28:12 -05:00
Folkert
637360fad5
clippy
2022-02-19 16:50:42 +01:00
Folkert
957140df64
remove builtin lookup function being passed around
2022-02-14 20:32:31 +01:00
hafiz
91483dbf55
Merge pull request #2471 from rtfeldman/fix_args_order
...
Swap arg order in `List` builtins to put the more-complex types first
2022-02-13 23:25:05 -05:00
ayazhafiz
ac680d0750
Aliases should not be public
2022-02-12 21:23:44 -05:00
ayazhafiz
e946b972f7
Only recursive tag unions are relevant in illegal cycles
2022-02-12 20:41:19 -05:00
Jan Van Bruggen
f47dbb5171
Swap List.mapWithIndex arg1 args order to put the element first
2022-02-11 16:10:29 -07:00
ayazhafiz
55769caad6
Redundant clone
2022-02-11 08:52:37 -05:00
ayazhafiz
c71854d5a4
Remove opt_rec_var
2022-02-11 08:51:08 -05:00
ayazhafiz
8c0e39211d
Instantiate recursive aliases to their smallest closures
...
Now, when we have two aliases like
```
T a : [ A, B (U a) ]
U a : [ C, D (T a) ]
```
during the first pass, we simply canonicalize them but add neither to
the scope. This means that `T` will not be instantiated in the
definition of `U`. Only in the second pass, during correction, do we
instantiate both aliases **independently**:
```
T a : [ A, B [ C, D (T a) ] ]
U a : [ C, D [ A, B (U a) ] ]
```
and now we can mark each recursive, individually:
```
T a : [ A, B [ C, D <rec1> ] ] as <rec1>
U a : [ C, D [ A, B <rec2> ] ] as <rec2>
```
This means that the surface types shown to users might be a bit larger,
but it has the benefit that everything needed to understand a layout of
a type in later passes is stored on the type directly, and we don't need
to keep alias mappings.
Since we sort by connected components, this should be complete.
Closes #2458
2022-02-11 08:43:33 -05:00
ayazhafiz
c064c50036
Catch illegal alias cycles more strictly
...
Part of #2458
2022-02-10 22:12:33 -05:00
ayazhafiz
13552b11a6
Check self- and mutually-recursive aliases in the same pass
2022-02-10 08:15:48 -05:00
ayazhafiz
6d72971d6b
Clippy and a ranged number unification bugfix
2022-02-06 15:04:12 -05:00
ayazhafiz
c5d918e68c
Include floats in bounds for unspecified numbers
2022-02-06 15:04:12 -05:00
ayazhafiz
8dc92ccd97
Second pass
2022-02-06 15:04:12 -05:00
ayazhafiz
5e0d90ac53
First pass
2022-02-06 15:04:12 -05:00
Folkert
5e16515d22
only generate the functions that the user wants
2022-02-06 12:26:34 +01:00
Folkert
5f1e2c60f8
change how hosted declarations are pushed
2022-02-04 21:56:57 +01:00
Folkert
f1ebc523b6
Merge remote-tracking branch 'origin/trunk' into hook-up-hosted-modules
2022-02-04 00:07:23 +01:00
ayazhafiz
21d1cd786c
Fix can tests
2022-02-03 00:43:04 -05:00
ayazhafiz
5362ed1e6c
Clippy
2022-02-02 23:38:54 -05:00
ayazhafiz
097c5afc73
Check lower bounds for numeric literals, and permit 128-bit literals
2022-02-02 23:35:57 -05:00
Folkert
16a2b660c3
bookkeeping
2022-02-02 23:11:52 +01:00
Folkert
5699db99b3
generate hosted functions (foreign functions supplied by the linker)
2022-02-02 22:29:05 +01:00
Folkert
14c0caa275
generate the Effect type and after/map/etc methods in a hosted module
2022-02-02 16:49:56 +01:00
Folkert
c335a8b406
move effect_module.rs
2022-02-02 16:48:59 +01:00