Agus Zubiaga
935d460236
Use plural 'effects' in FxInTopLevel error
2024-11-07 18:54:25 -03:00
Agus Zubiaga
c9f001b041
Allow ignored defs with an effectful RHS
2024-11-07 18:54:22 -03:00
Agus Zubiaga
175a2b5683
Add hint about forgetting to call a function
2024-11-07 18:54:21 -03:00
Agus Zubiaga
af6fc6306f
Treat untyped unsuffixed functions as pure
2024-11-07 18:54:21 -03:00
Agus Zubiaga
70fa4d036c
Test opaque destructure suffixes
2024-11-07 18:54:21 -03:00
Agus Zubiaga
a0783c3132
Test tag destructure suffixes
2024-11-07 18:54:21 -03:00
Agus Zubiaga
2c208f9389
Test tuple destructure suffixes
2024-11-07 18:54:20 -03:00
Agus Zubiaga
e75b1cf7a0
Check suffixes of all pattern identifiers
2024-11-07 18:54:20 -03:00
Agus Zubiaga
a31a35100b
Report suffixed pure function in literal record field
2024-11-07 18:54:20 -03:00
Agus Zubiaga
215de707fa
Report unsuffixed record literal field with effectful function
2024-11-07 18:54:20 -03:00
Agus Zubiaga
ea35094b28
Remove flex var case when checking symbol suffix
2024-11-07 18:54:20 -03:00
Agus Zubiaga
89a918cebe
Fix unifying pure with flex vars
2024-11-07 18:54:19 -03:00
Agus Zubiaga
6533e9084d
Add fx to ErrorType
2024-11-07 18:54:19 -03:00
Agus Zubiaga
6adc6d9168
Report ignored statement results
2024-11-07 18:54:18 -03:00
Agus Zubiaga
b01771c5ae
Show effectful function name in mismatches
2024-11-07 18:54:18 -03:00
Agus Zubiaga
f666dba67d
Report effectful top-level exprs
2024-11-07 18:54:17 -03:00
Agus Zubiaga
b62665e49e
Report effectful statement in pure function
2024-11-07 18:54:17 -03:00
Agus Zubiaga
fd2493ee51
Report effect call in pure function
2024-11-07 18:54:17 -03:00
Agus Zubiaga
839078b5d1
Test aliased unsuffixed effectful function
2024-11-07 18:54:17 -03:00
Agus Zubiaga
d22b2a79f5
Suffixed pure function warning
2024-11-07 18:54:17 -03:00
Agus Zubiaga
1da8af390b
Unsuffixed effectul function warning
2024-11-07 18:54:16 -03:00
Agus Zubiaga
69e026f8bb
Leftover statement warning for pure statements
2024-11-07 18:54:16 -03:00
Agus Zubiaga
2cce5ad023
Allow unsuffixed statements in parser
...
Moves the "STATEMENT AFTER EXPRESSION" error from the parser to canonicalization.
We'll later use this to allow this case in effectful functions.
2024-11-07 18:54:14 -03:00
Agus Zubiaga
160dbee943
Nicer message for unhandled expr errors
2024-11-06 12:15:38 -03:00
Agus Zubiaga
f4c8492c1c
Report return syntax errors
2024-11-06 10:50:32 -03:00
Luke Boswell
c00db6da37
Merge remote-tracking branch 'remote/main' into rebuild-platform
2024-11-04 13:57:51 +11:00
Sam Mohr
66cc96edbb
Address PR comments from @ayazhafiz
2024-10-29 15:58:35 -07:00
Sam Mohr
a9cd6ac5fa
Fix tailcalling
2024-10-26 06:48:01 -07:00
Luke Boswell
926014518f
Merge remote-tracking branch 'remote/main' into rebuild-platform
2024-10-24 10:21:08 +11:00
JRI98
511308d4d3
Fix #6240
2024-10-22 12:04:48 +01:00
Luke Boswell
e3afeaa7ff
WIP Merge remote-tracking branch 'remote/main' into rebuild-platform
2024-10-09 09:21:46 +11:00
hrishisd
cb98c45e88
Remove deprecated string interpolation syntax
2024-10-08 16:31:22 -04:00
Nathan Kramer
be4e3b5983
Suggest link to tutorial's operator desugaring table
2024-09-30 18:14:35 +10:00
Anton-4
0a0bc897f6
add final expression tip
2024-09-26 20:17:35 +02:00
Richard Feldman
87b7bb1fac
Fix "opaquees" in error message
2024-09-25 22:11:14 -04:00
Sam Mohr
2da08be8ef
Remove old record builder syntax
2024-09-21 04:44:44 -07:00
Luke Boswell
bb57c4a600
remove unneded basic-cli reference in test_reporting
2024-09-04 21:50:15 +10:00
Elias Mulhall
f356f6f7a0
Do not display generated symbol names in error messages
...
When an error message reports on a symbol that was generated during
canonicalization, use text like "This value" instead of "This `123`
value". Generated symbols use the identifier index as the symbol name,
since valid Roc variables cannot begin with a number so there's no
chance of collision. We don't want to display generated symbols to the
user, so when building the error message we check if the symbol's name
starts with a digit.
2024-09-03 14:00:46 -04:00
Anton-4
02cf61f985
Merge pull request #7038 from mulias/expr-dbg
...
Support `dbg` in expressions
2024-09-02 13:30:32 +02:00
Elias Mulhall
56c5b790a7
Refactor dbg expression parsing to work more like function application
...
Instead of parsing dbg with an expression block, parse the dbg keyword
with no additional arguments. This way the parser treats dbg just like a
variable in function application. We desugar by pattern matching on
`Apply(Dbg, args, called_via)` nodes. This changes the output of syntax
tests since the initial AST is different, but does not change the output
of can or mono.
Add two new errors for dbg in expression position with either no args or
too many args. This is similar to the error behavior of `crash`.
Continue to parse dbg statements with an expression block, as before.
2024-08-29 15:36:48 -04:00
Elias Mulhall
2242e9b2c3
Remove error handling for dbg in expression position
2024-08-28 11:53:44 -04:00
Sam Mohr
12df3a04de
Merge attempt
2024-08-19 23:34:05 -07:00
Sam Mohr
50f6e11423
Deprecate backpassing to prepare for eventual removal
2024-08-16 22:36:04 -07:00
Sam Mohr
7c15c16ae0
Fix failing test_reporting tests
2024-08-13 01:35:00 -07:00
Sam Mohr
7e72541a79
Merge branch 'main' into builtin-task
2024-08-12 23:12:38 -07:00
Joshua Warner
d25c048d48
Move Full from fmt to parse and reorganize confusingly-named Module ast type
2024-08-07 23:01:49 -07:00
Sam Mohr
8288af3156
Merge branch 'main' into builtin-task
2024-07-31 13:36:32 -07:00
Anton-4
d23426ac47
Merge pull request #6941 from roc-lang/improve-tip
...
improve opaque types tip
2024-07-31 13:48:51 +02:00
Anton-4
30a76a092b
improve opaque types tip
2024-07-30 16:06:23 +02:00
Luke Boswell
eca453d07f
Merge remote-tracking branch 'remote/main' into builtin-task
2024-07-29 16:05:51 +10:00