Commit graph

240 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
Folkert
6ffe14809f
don't populate Scope with aliases
these are now properly imported. For testing reporting we still need a way
to provide them without resolving imports (just for speed)
2022-04-22 20:49:46 +02:00
Jared Cone
1ee2f85f9e
Exclude filename from repl reports. 2022-04-21 22:44:07 -07:00
Richard Feldman
3a0adb1c7e
Merge pull request #2904 from rtfeldman/cli-args
CLI revisions
2022-04-21 12:59:08 -04: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
b48e63e931
Fixed formatting and clippy errors 2022-04-20 21:25:11 -07:00
Jared Cone
66009c4b3c
Updated unit tests 2022-04-20 21:25:11 -07:00
Jared Cone
477055b0fb
Show relative path instead of full
Relative path is more concise and full path would not work well with unit testing expected output
2022-04-20 21:25:11 -07:00
Jared Cone
3243765eb4
Include file path in report
If the path is too long to fit in the 80 characters with everything else it will be truncated to '...foo/bar.roc'
2022-04-20 21:25:10 -07:00
Ayaz
78ce0f8f3e
Update reporting/src/error/type.rs
Co-authored-by: Richard Feldman <oss@rtfeldman.com>
2022-04-20 22:50:23 -04:00
Richard Feldman
e2ea66043a
Add color_reset to StyleCodes 2022-04-20 20:43:39 -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
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
0c96c0b66f
Professional basketball team Los Angeles Clippy 2022-04-19 20:53:45 -04: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
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
3a736c6ece
Match typo suggestion color with typo color 2022-04-19 20:53:43 -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
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