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
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
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
Richard Feldman
48909f2114
Add RuntimeError::ExposedButNotDefined
2020-12-11 21:13:34 -05:00
Richard Feldman
ed222912b3
Report exposed-but-not-defined symbols
2020-12-10 23:59:15 -05:00
Sébastien Besnier
5273896981
working feature
2020-11-04 09:49:19 +01:00
Sébastien Besnier
aaff5a5dce
first draft about invalid optional fields in records
2020-11-03 21:28:50 +01:00
Richard Feldman
2e15443c8c
Canonicalize unicode code point escapes
2020-08-31 23:13:50 -04:00
Richard Feldman
274e7e786d
Constrain string interpolation
2020-08-31 23:13:50 -04:00
Folkert
c18bbe9a63
join points with arguments
2020-08-05 22:33:07 +02:00
Folkert
331a8ed5eb
error message for record update and missing module
2020-07-14 23:37:19 +02:00
Folkert
732496231c
expand some comments
2020-07-08 14:30:48 +02:00
Folkert
edb79b8fce
pretty error messages for floats
2020-07-07 22:53:54 +02:00
Folkert
9d67b11c0d
pretty error messages for integers
2020-07-07 22:10:23 +02:00
Folkert
e595c14fae
wip
2020-07-06 20:38:10 +02:00
Folkert
b7d689226c
cover all parsed patterns with an error message
...
but, some invalid patterns are not parsed as expected. See https://github.com/rtfeldman/roc/issues/399
2020-07-04 20:39:49 +02:00
Folkert
0c7a4179aa
report malformed int and float patterns
2020-07-04 20:29:37 +02:00
Folkert
98ac988e99
use symbols instead of identifiers; prevents cloning
2020-07-03 19:23:58 +02:00
Folkert
667233a00d
report error for invalid alias argument patterns
2020-07-03 16:54:28 +02:00
Folkert
0cfb16c7d5
implement canonicalization error when signature pattern does not match definition pattern.
2020-07-02 23:24:10 +02:00
Richard Feldman
99dcda8603
Use inlinable_string 0.1
2020-05-31 20:14:19 -04:00
Richard Feldman
ce9e7a91f6
Clean up some Cargo.toml files
2020-05-03 21:37:59 -04:00
Richard Feldman
101dc80ae5
Move parse::operator into module::operator
2020-05-01 21:58:53 -04:00
Richard Feldman
1c1fee7e31
Trim trailing space off pretty_assertions dep
2020-04-16 19:24:24 -04:00
Folkert
7e4a1ef4bd
better message for duplicate fields/tags
2020-04-14 21:18:37 +02:00
Folkert
f6af66f342
record, tag, alias errors
...
- duplicate fields and tags are reported
- circular aliases are reported
2020-04-13 20:53:16 +02:00
Folkert
fd7ca5bcc9
don't add guarded record fields into scope
2020-04-09 01:08:09 +02:00