Commit graph

146 commits

Author SHA1 Message Date
Folkert
fe76858e2d
an error message that was changed is now what it was again 2022-04-24 17:43:34 +02:00
Folkert
452447232f
bitvec all the things 2022-04-24 02:18:43 +02:00
Folkert
ca072b6625
add function references test 2022-04-23 22:15:17 +02:00
Folkert
32edd55d3d
sanity check 2022-04-23 15:32:15 +02:00
Jared Cone
f097a4ffdb
Updated new tests 2022-04-20 22:59:28 -07:00
Jared Cone
497b8c114e
Updated new tests 2022-04-20 22:02:13 -07:00
Jared Cone
bfbd810ae6
Updated new tests 2022-04-20 21:25:12 -07:00
Jared Cone
d20542efae
Updated tests to use deterministic tmp dir 2022-04-20 21:25:12 -07:00
Jared Cone
66009c4b3c
Updated unit tests 2022-04-20 21:25:11 -07:00
Ayaz Hafiz
80dc50763e
Using abilities as types is illegal, but we can still compile them
Closes #2881
2022-04-20 17:46:18 -04:00
Ayaz Hafiz
cbfd76380a
Improve ability generalization error message 2022-04-20 17:45:41 -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
bd6078a34a
Fix reporting tests 2022-04-20 17:43:17 -04:00
Folkert de Vries
30731da716
Merge pull request #2892 from rtfeldman/i/2878
Explicitly disallow ability definitions in nested scopes
2022-04-20 14:51:21 +02:00
Richard Feldman
b35ff3add3
cargo fmt 2022-04-19 20:53:45 -04:00
Richard Feldman
85d30a541d
Update reporting tests 2022-04-19 20:53:45 -04:00
Richard Feldman
fdb378f859
Drop extraneous space before newline 2022-04-19 20:53:44 -04:00
Ayaz
5188f8f7df
Merge branch 'trunk' into i/2878 2022-04-18 21:46:23 -04:00
Ayaz Hafiz
f129777115
Explicitly disallow ability definitions in nested scopes
Abilities can only be defined on the toplevel of a module. There is a
technical reason to this, which is that during type solving we must
introduce all abilities at the very beginning, and we need to make sure
ranks are correct. But there is a practical reason as well, which is
that nested ability definitions don't seem to be very useful.

Note that specializations can be nested, and are allowed to be. Also, we
can revisit this in the future. I just don't want experiments to break
right now because someone uses an ability in a nested scope where we
don't expect.

Closes #2878
2022-04-18 18:04:46 -04:00
Folkert
8692938fb3
Merge branch 'vecset-references' into builtins-in-roc 2022-04-17 19:39:03 +02:00
Richard Feldman
718b999751
Merge pull request #2857 from rtfeldman/abilities-mono
Codegen for abilities
2022-04-16 22:59:16 -04:00
Folkert
c6f1001161
fix reporting tests 2022-04-16 21:38:39 +02:00
Folkert
e112f6ad2c
Merge remote-tracking branch 'origin/trunk' into builtins-in-roc 2022-04-16 21:01:51 +02:00
Ayaz Hafiz
eb81c68bcb
Pass abilities store to mono 2022-04-14 16:20:55 -04:00
Ayaz Hafiz
ff3f54b3eb
Bugfix report message 2022-04-14 08:59:41 -04:00
Ayaz Hafiz
8eec930260
More and smarter checking and error reporting for abilities 2022-04-13 15:25:19 -04:00
Ayaz Hafiz
0792ccbbe8
Calling ability with non-specialized type is an error 2022-04-13 11:49:33 -04:00
Ayaz Hafiz
de9d97c5d1
Ability specialization checks against annotation 2022-04-13 10:46:41 -04:00
Ayaz Hafiz
5e1ab8225e
Report when ability member binds >1 variable to parent 2022-04-13 10:11:24 -04:00
Ayaz Hafiz
03d4d81f8d
Remove unnecessary condition 2022-04-13 08:41:45 -04:00
Ayaz Hafiz
67b5ab7fe7
Add test for when specialization types conflict 2022-04-12 19:01:36 -04:00
Ayaz Hafiz
d94556d807
Report overly general specializations 2022-04-12 18:52:49 -04:00
Ayaz Hafiz
16d0060824
Report errors for type errors in specializations outside of ability impl 2022-04-12 18:41:20 -04:00
Ayaz Hafiz
127d435ff2
Report incomplete ability implementations 2022-04-12 18:26:19 -04:00
Ayaz Hafiz
5171e3964d
Lift able variables to the top of a reported error type 2022-04-12 17:19:27 -04:00
Ayaz Hafiz
a73c8a85c2
Remove stray test for now 2022-04-12 17:10:44 -04:00
Ayaz Hafiz
865c1f15d7
Fix test compile errors, and simply load_internal tests 2022-04-12 16:42:51 -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
Folkert
6ef443d1b0
Merge remote-tracking branch 'origin/trunk' into builtins-in-roc 2022-04-10 19:14:00 +02:00
Folkert
be1f06f872
fix name suggestions in reporting tests 2022-04-10 17:17:00 +02:00
Folkert
0551b564bd
fix num import issues in reporting tests 2022-04-10 17:09:50 +02:00
ayazhafiz
94a5cd3559 Improve shadow errors 2022-04-07 22:38:20 -04:00
ayazhafiz
13a17f1858 Improve error message 2022-04-07 22:26:17 -04:00
Ayaz Hafiz
66ec1b4a84 Basic canonicalization and error checking for abilities 2022-04-07 17:21:17 -04:00
Ananda Umamil
39feabe502
Add error message when imports are missing 2022-03-27 13:46:27 +07:00
Folkert
9b63e6a3a9
simplify IntroducedVariables 2022-03-18 23:47:39 +01:00
Brian Carroll
9cb6261a4d
Merge pull request #2736 from rtfeldman/wasm-repl-palette
Web REPL error styling
2022-03-18 12:00:44 +00:00
Folkert
a3b00fbf55
Merge branch 'explicit-closed-tag-record' into delay-instantiating-aliases 2022-03-17 20:34:52 +01:00
Brian Carroll
0d7a7fe34f reporting: generalise text styles to work with HTML as well as ANSI 2022-03-17 09:35:58 +00:00
Folkert
de37897df4
fix reporting tests compilation 2022-03-16 22:10:20 +01:00