Anton-4
0f59f3097a
cargo fix --edition
2022-05-16 17:04:17 +02:00
Ayaz Hafiz
b92e3a07ac
Remove irrelevant errors
2022-05-09 09:48:30 -04:00
Ayaz Hafiz
b0734c3d80
Disallow abilities on toplevel of scope
2022-05-09 09:45:02 -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
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
Ayaz Hafiz
5e1ab8225e
Report when ability member binds >1 variable to parent
2022-04-13 10:11:24 -04:00
ayazhafiz
94a5cd3559
Improve shadow errors
2022-04-07 22:38:20 -04:00
Ayaz Hafiz
66ec1b4a84
Basic canonicalization and error checking for abilities
2022-04-07 17:21:17 -04: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
eed7e3df71
Report invalid extension types during canonicalization
...
Closes #2541
2022-03-06 22:17:22 -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
10f665f6c5
Amend 4d10c22
: 🐛 Fix a typo in doccomment for ModuleNotImported
...
blammed by the spellchecker! how embarrassing
2022-02-25 11:46: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
90de82e295
Validation of opaques during canonicalization
2022-02-21 18:25:19 -05:00
ayazhafiz
6b53692aac
Canonicalize opaque types
2022-02-20 13:47:01 -05:00
Folkert
5e16515d22
only generate the functions that the user wants
2022-02-06 12:26:34 +01:00
ayazhafiz
097c5afc73
Check lower bounds for numeric literals, and permit 128-bit literals
2022-02-02 23:35:57 -05:00
ayazhafiz
a6f7579c07
Parse and expand numeric bounds in canonicalization pass
2022-02-01 22:50:46 -05:00
ayazhafiz
4e942b3e5d
Make nested datatypes into errors
...
I was hoping to add nested datatypes into the language, but it turns out
doing so is quite tricky and not all that useful with Roc's current
compilation model. Basically every implementation strategy I could think
of ended up requiring a uniform representation for the data layout
(or some ugly workaround). Furhermore it increased the complexity of the
checker/mono IR generator a little bit - basically, we must always pass
around the alias definitions of nested datatypes and instantiate them
at usage sites, rather than being able to unroll aliases as we currently
do during canonicalization.
So, especially because we don't support polymorphic recursion anyway, I
think it may be better to simply disallow any kind of nested datatypes
in the language. In any case, Stephanie Weirich [seems to think nested
datatypes are not needed](https://www.cis.upenn.edu/~plclub/blog/2020-12-04-nested-datatypes/ ).
Closes #2293
2022-01-31 22:58:01 -05:00
Joshua Warner
f19220473a
Rename Located -> Loc
2021-12-22 19:18:22 -08:00
Chelsea Troy
f680ee3c24
Fix a spelling mistake; how was this ever passing?
2021-12-01 18:41:37 -06:00
Chelsea Troy
6cf755ad8d
Resolve a bunnnch of merge conflicts
2021-11-29 23:14:29 -06:00
Folkert de Vries
71233fcfc1
Merge pull request #2012 from rtfeldman/i/1714
...
Take syntactic sugar into account when reporting errors
2021-11-19 10:26:24 +01:00
ayazhafiz
8b7217847d
Rename additional stale roc_module::operator refs and format
2021-11-18 20:20:33 -05:00
ayazhafiz
8a60162a1e
Rename roc_module::operator -> roc_module::called_via
...
A bit of a nit, but this file is now more general than just keeping
track of operator methods.
2021-11-18 20:20:33 -05:00
ayazhafiz
214b8a30a9
Suggest typo fixes for non-existing module values
2021-11-17 22:40:51 -05:00
Brendan Hansknecht
bddc08c977
Remove unused dependencies
2021-11-05 16:58:11 -07:00
Anton-4
a3fc724df3
removed unused maplit
2021-11-03 10:50:25 +01:00
Eric Correia
8272ea876f
Get it all to compile!
2021-10-02 13:48:07 -04:00
Richard Feldman
267836226c
s/CodePoint/CodePt/g
2021-08-07 21:46:20 -04:00
Folkert
d4896d3ed2
remove inlinable_string dependency
2021-08-03 21:24:19 +02:00
Folkert
ceb5cc66fa
use IdentStr
2021-08-03 21:14:36 +02:00
Richard Feldman
a7518a675a
Clean up some clippy warnings
2021-05-23 20:28:23 -04:00
Richard Feldman
0a50b0b488
Change license to UPL-1.0
...
Closes https://github.com/rtfeldman/roc/issues/1199
2021-04-21 19:18:44 -04:00
Folkert
2bb1f2cca7
improve error reporting for underscore expr
2021-04-12 20:48:58 +02:00
Richard Feldman
792a18816a
Update authors in Cargo.toml
2021-04-11 08:11:52 -04:00
Folkert
112e97c4a2
improve circular definition error reporting
2021-04-10 21:39:20 +02:00
Folkert
b681923270
report malformed type names in annotations
2021-03-21 22:52:23 +01:00
Folkert
a87dfac7da
improved malformed patterns
2021-03-01 16:12:37 +01:00
Folkert
e395d18e16
bunch of stuff
2021-02-28 23:36:27 +01:00
Folkert
dc5eec189c
report unexposed values
2021-02-07 01:17:46 +01:00
Folkert
7731ab38d1
update tests
2021-01-21 22:41:47 +01:00
Folkert
b8c0c85395
tell me what function has no implementation
2021-01-20 16:29:19 +01:00
Folkert
917ec9c44c
make List.first/List.last work
2020-12-24 01:00:37 +01:00
Anton-4
b085469602
Replaced large_enum_variant explanation with link to issue #800
2020-12-14 16:09:16 +01:00