Richard Feldman
4eec34becf
Update to use new square brace formatting
2022-05-22 23:15:54 -04:00
Folkert
fb37d925dc
deal with aliases around number types
2022-05-21 21:28:31 +02:00
Folkert
d43bda83b4
cleanup
2022-05-21 20:50:06 +02:00
Folkert
98ce9f4d09
remove the snapshots
2022-05-21 20:42:19 +02:00
Folkert
b46721e43b
exit early from range checking
2022-05-21 18:28:11 +02:00
Folkert
e9bdf0e5de
re-enable builtin module caching
2022-05-20 22:24:21 +02:00
Ayaz Hafiz
cf56b5015a
Fix existing reporting tests
2022-05-19 18:23:02 -04:00
Ayaz Hafiz
2c87214b44
Check derivability of abilities for structural types
2022-05-19 18:23:02 -04:00
Richard Feldman
1047c5635a
Merge remote-tracking branch 'origin/trunk' into test-bindgen
2022-05-19 14:10:53 -04:00
Richard Feldman
7a353f0e0c
Fix --release warnings
2022-05-18 08:20:22 -04:00
Anton-4
0f59f3097a
cargo fix --edition
2022-05-16 17:04:17 +02:00
Richard Feldman
de75f2e550
Fix --release warnings
2022-05-15 22:10:24 -04:00
Richard Feldman
9bc1e320dc
Fix --release warnings
2022-05-15 21:50:49 -04:00
Ayaz Hafiz
62ebb80f09
Handle recursion through Apply
s with errors
...
Closes #219
2022-05-10 12:58:14 -04:00
Ayaz Hafiz
5a5fc0162d
FlexAble must always constrain a Flex
2022-05-08 15:08:18 -04:00
Ayaz Hafiz
9964f86a3d
Factor bespoke debug variables into debug_flags crate
2022-04-29 17:45:55 -04:00
Ayaz Hafiz
afe49cf570
Cleanup
2022-04-28 20:34:04 -04:00
Ayaz Hafiz
b6383f81ee
Numbers are opaques
2022-04-25 10:59:42 -04:00
Ayaz Hafiz
969d14dfe9
I love 50 arguments
2022-04-25 10:59:42 -04:00
Ayaz Hafiz
8b291854d3
Improve alias<->opaque unification logic
2022-04-25 10:59:40 -04:00
Ayaz Hafiz
bb06bcd7f1
Fix compile error
2022-04-22 17:57:02 -04:00
ayazhafiz
939f413569
Don't try to fix recursion vars if there are other errors
2022-04-22 17:57:02 -04:00
Ayaz
3906c5c200
Clippy
2022-04-22 17:57:01 -04:00
Ayaz Hafiz
b61481c6e7
Try another strategy - fix recursion vars during typechecking
2022-04-22 17:57:01 -04:00
Ayaz Hafiz
11f29baf25
Add note about output
2022-04-21 09:34:40 -04:00
Ayaz Hafiz
21661275d8
Show unified variables as a tree
2022-04-21 09:32:26 -04:00
Ayaz Hafiz
9d71a3d1ac
Generalizing ability type instance to ability is illegal
...
Closes #2881
2022-04-20 17:45:40 -04:00
Ayaz Hafiz
e0c9931326
Bugfix debug printing
2022-04-18 10:21:56 -04:00
Richard Feldman
718b999751
Merge pull request #2857 from rtfeldman/abilities-mono
...
Codegen for abilities
2022-04-16 22:59:16 -04:00
Ayaz Hafiz
00e5205d4c
More debugging for unified types
2022-04-15 09:53:23 -04:00
Ayaz Hafiz
7d4a006377
Bugfix sorting must implement constraints
...
Also makes things go faster
2022-04-15 09:29:12 -04:00
Ayaz Hafiz
fbe7ccf4c8
Use error macro
2022-04-15 08:51:29 -04:00
Ayaz Hafiz
b79b351136
The first ability... compiles
2022-04-14 16:50:41 -04:00
Ayaz Hafiz
15a040ec87
Basic type inference and solving for abilities
...
Note that is still pretty limited. We only permit opaque types to
implement abilities, abilities cannot have type arguments, and also no
other functions may depend on abilities
2022-04-12 16:18:07 -04:00
Ayaz Hafiz
913d97cab1
Add needed imports
2022-04-12 16:18:07 -04:00
Ayaz Hafiz
886e5a0c8f
Don't unify real vars when there are no type variables, or nothing changed
2022-04-05 17:51:30 -04:00
Ayaz Hafiz
163c6b39d6
Unify type alias "real variables"
...
Turns out that we can't always assume that a successful unification of
type alias type variables means that those aliases had the same real
type from the start. Because type variables may contain unbound type
variables and grow during their unification (for example,
`[InvalidNumStr]a ~ [ListWasEmpty]b` unify to give `[InvalidNumStr,
ListWasEmpty]`), the real type may grow as well.
For this reason, continue to explicitly unify alias real types for now.
We can get away with not having to do so when the type variable
unification causes no changes to the unification tree at all, but we
don't have a great way to detect that right now (maybe snapshots?)
Closes #2583
2022-04-05 11:21:52 -04:00
Folkert
0dd2cec09a
update with new clippy lints
2022-03-31 19:34:51 +02:00
Folkert
7062a71216
clippy
2022-03-20 21:42:04 +01:00
Folkert
7d8409f6a6
write Aliases implementation
2022-03-15 22:02:04 +01:00
ayazhafiz
5670fe06cd
Deal with destructuring tag unions behind opaques correctly
...
Closes #2702
2022-03-13 18:44:38 -05:00
Folkert
a9c8e2dc3e
copy instead of clone Content
2022-03-06 19:07:18 +01:00
Folkert
1ff8261a66
make Content Copy
2022-03-06 18:51:23 +01:00
ayazhafiz
07b1829732
Improve error reporting for patterns not matching opaques
2022-02-27 00:11:11 -05:00
ayazhafiz
736645cd8c
Remove some dead code
2022-02-27 00:10:12 -05:00
ayazhafiz
059c324268
Error reporting for type mismatches involving opaques
2022-02-27 00:10:12 -05:00
ayazhafiz
0d241f3c3c
Only expand ErrorType::Range
's type range when range unification fails
2022-02-06 15:04:13 -05:00
ayazhafiz
aaac22f6c2
Respell typo
2022-02-06 15:04:13 -05:00
ayazhafiz
ff3596505e
Fix gen tests
2022-02-06 15:04:12 -05:00
ayazhafiz
680bf8e0b7
Treat rigids as flex vars when checking number range types
2022-02-06 15:04:12 -05:00