Ayaz
78ce0f8f3e
Update reporting/src/error/type.rs
...
Co-authored-by: Richard Feldman <oss@rtfeldman.com>
2022-04-20 22:50:23 -04: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
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
0c96c0b66f
Professional basketball team Los Angeles Clippy
2022-04-19 20:53:45 -04:00
Richard Feldman
5562121006
Use ':' and '.' contextually in error messages
...
e.g. record update errors complain about 'foo:'
being wrong, whereas record access errors
complain about '.foo' being wrong.
2022-04-19 20:53:44 -04:00
Richard Feldman
fdb378f859
Drop extraneous space before newline
2022-04-19 20:53:44 -04:00
Richard Feldman
40aca3c20d
Remove another gazillion allocations from reporting
2022-04-19 20:53:44 -04:00
Richard Feldman
27edc49271
Use nicer report for record field mismatches
2022-04-19 20:53:44 -04:00
Richard Feldman
3f698c9878
Remove a gazillion allocations from reporting
2022-04-19 20:53:44 -04:00
Richard Feldman
7fc01a0a9b
Annotate record typos and suggestions better
2022-04-19 20:53:44 -04:00
Richard Feldman
681e73d393
Combine record and record snippet reporting
2022-04-19 20:53:43 -04:00
Richard Feldman
ab44f23e0f
Revise record field typo error report
2022-04-19 20:53:43 -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
e112f6ad2c
Merge remote-tracking branch 'origin/trunk' into builtins-in-roc
2022-04-16 21:01:51 +02: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
5e1ab8225e
Report when ability member binds >1 variable to parent
2022-04-13 10:11:24 -04:00
Ayaz Hafiz
d94556d807
Report overly general specializations
2022-04-12 18:52:49 -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
cbbbb8c855
Remove stray dbg
s
2022-04-12 16:32:50 -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
1d0f9e9192
Merge remote-tracking branch 'origin/trunk' into builtins-in-roc
2022-04-08 15:47:11 +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
Folkert
0dd2cec09a
update with new clippy lints
2022-03-31 19:34:51 +02:00
Ananda Umamil
39feabe502
Add error message when imports
are missing
2022-03-27 13:46:27 +07:00
Ananda Umamil
1086189d76
Fix incorrect report title
2022-03-27 13:00:58 +07:00
Folkert
4e1197165b
Merge remote-tracking branch 'origin/trunk' into builtins-in-roc-delayed-alias
2022-03-18 21:25:52 +01:00
ayazhafiz
8aaf614481
Improve error message
2022-03-15 11:18:02 -05:00
ayazhafiz
787c8ee3a5
s/occurence/occurrence/g
2022-03-14 17:50:55 -05:00
ayazhafiz
3da34fc843
Report unbound type variables in aliases, opaques
...
Closes #2726
2022-03-14 17:42:45 -05:00
ayazhafiz
aa9ea8ba36
Redundant reference
2022-03-12 23:24:32 -06:00
ayazhafiz
d92a5b9424
Reporting for abilities parsing
2022-03-12 22:08:01 -06:00
Folkert
831a90e310
Merge remote-tracking branch 'origin/trunk' into builtins-in-roc
2022-03-08 22:36:06 +01:00
Derek Gustafson
aea55e5bf5
Fix panic on unknown type reaching typechecker.
2022-03-08 11:40:01 -05:00
Derek Gustafson
ba6b225761
Hide RocDec implemntation details.
2022-03-07 15:34:02 -05:00
ayazhafiz
eed7e3df71
Report invalid extension types during canonicalization
...
Closes #2541
2022-03-06 22:17:22 -05:00
ayazhafiz
6672a174f2
Mention lack of if clause in missing guard pattern
2022-03-06 09:51:38 -05:00
Folkert
adf4ad22a5
Merge remote-tracking branch 'origin/trunk' into builtins-in-roc
2022-03-05 20:55:15 +01:00
ayazhafiz
cc07c93fc3
Add note about lack of a guard in missing tag
2022-03-05 13:34:49 -05:00
ayazhafiz
81481e2599
Report non-exhaustive patterns with guards
2022-03-05 13:30:02 -05:00
Folkert
a4889fd571
we are compiling
2022-03-02 18:48:34 +01:00
Folkert
01a7fe77d4
even more wip
2022-03-02 17:32:50 +01:00
Folkert
ec099bbdec
WIP
2022-03-02 14:46:30 +01:00