Commit graph

177 commits

Author SHA1 Message Date
Anton-4
02cf61f985
Merge pull request #7038 from mulias/expr-dbg
Support `dbg` in expressions
2024-09-02 13:30:32 +02:00
Anton-4
3c679f6338
Merge branch 'main' into lower-module-params 2024-08-30 16:29:46 +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
Elias Mulhall
a16f757164 Pass var_store into desugar_expr so that desugaring may generate fresh vars 2024-08-28 11:53:44 -04:00
Agus Zubiaga
287a8fa2e7
Merge branch 'main' into lower-module-params 2024-08-28 08:50:40 -03:00
Sam Mohr
12df3a04de
Merge attempt 2024-08-19 23:34:05 -07:00
Agus Zubiaga
519ff56a85
Create can::module::ModuleParams for convenience 2024-08-17 13:10:37 -03: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
Agus Zubiaga
b451e69b20
Merge branch 'main' into typecheck-module-params 2024-08-12 22:27:16 -03: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
Agus Zubiaga
762799052e
Merge branch 'main' into typecheck-module-params 2024-08-07 18:55:33 -03: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
Joshua Warner
df915b936d
Feedback: add doc comments, verbiage changes, capitalize Roc, remove a resolved TODO 2024-07-28 14:45:32 -07:00
Richard Feldman
413de7f72e
s/roc/Roc in an error message
Signed-off-by: Richard Feldman <oss@rtfeldman.com>
2024-07-28 11:37:40 -04:00
Joshua Warner
4f32f43048
Implement block / indent based parsing
... and enforce that defs can only occur in blocks (or, inside parenthesized expressions)
2024-07-27 13:34:16 -07:00
Kiryl Dziamura
0086a531a2
add todo tests 2024-07-23 23:16:50 +02:00
Luke Boswell
b489c44b19
Merge remote-tracking branch 'remote/main' into builtin-task 2024-07-19 19:51:50 +10:00
Sam Mohr
74f05eca40
Fix broken test_reporting test 2024-07-07 19:02:31 -07:00
Sam Mohr
fe1b6d71fc
Update from PR comments 2024-07-07 18:33:20 -07:00
Sam Mohr
f415017c90
Implement new builder syntax alongside old one 2024-07-07 03:28:59 -07:00
Agus Zubiaga
26fe91b02f
Always use "MODULE PARAMS" term in errors
The theory is that this will be more searchable
2024-07-06 22:07:29 -03:00
Agus Zubiaga
0cbb352a89
Move unexpected params warning to solve 2024-07-06 21:36:26 -03:00
Sam Mohr
6f5f5f431e
Merge branch 'main' into builtin-task 2024-07-03 13:37:46 -07:00
Agus Zubiaga
13ba59a4cb
Fix hang on qualified import with builtin name 2024-07-03 12:40:53 -03:00
Sam Mohr
f61b303a59
Merge branch 'main' into builtin-task 2024-07-03 00:42:48 -07:00
Agus Zubiaga
922b1c44ef
Report missing params 2024-07-02 11:10:00 -03:00
Agus Zubiaga
bc6a84a215
Report unexpected params 2024-07-02 11:09:59 -03:00
Agus Zubiaga
5ec4b042bb
Constrain and solve import params
No reporting yet
2024-07-02 04:10:46 -03:00
Agus Zubiaga
dd0e28240a
Add module param identifiers to solve's scope 2024-07-02 04:10:45 -03:00
shua
d90da3af52
rm TotallyNotJson
TotallyNotJson.roc now lives on the farm in virtual-dom-wip as Json.roc.
Any reference in stdlib or builtins has been removed, as well as the
last places it was used (in python/ruby-interop examples).
2024-07-01 20:37:23 +02:00
shua
0faa1d5f20
test_gen: replace stdlib Json with inline implementation
Towards the goal of removing Json from stdlib, this change replaces
usage of TotallyNotJson in test_gen/gen_abilities with a simple usable
inline implementation of Encoder/DecoderFormatting.

Similarly, the use of TotallyNotJson in test_reporting is not necessary
at all and is replaced with a Decoder that wouldn't actually work, but
which does compile.
2024-07-01 20:30:05 +02:00
Sam Mohr
700c7ae9aa
Add Task as a built-in module/type 2024-06-25 00:03:56 -07:00
JRI98
f4551978ce
Handle multi pattern unbound list rest variables 2024-06-21 17:01:49 +01:00
Anton-4
4d00e9ad51
Merge branch 'main' into main
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2024-06-11 18:18:47 +02:00
John Konecny
a189e3ab20 Warnings are now yellow 2024-06-09 13:23:31 -04:00
Agus Zubiaga
6640893410
Fix test_reporting UNRECOGNIZED_PACKAGE header 2024-06-08 20:23:28 -03:00
Agus Zubiaga
4e5fdfbf52
Handle root type when loading from str 2024-06-08 19:46:41 -03:00
Agus Zubiaga
0283bd1d24
UNKNOWN PACKAGE -> UNRECOGNIZED PACKAGE rename 2024-06-08 18:34:45 -03:00
Agus Zubiaga
7faff12cbf
Report unrecognized shorthands when loading from the root module 2024-06-08 14:12:01 -03:00
Agus Zubiaga
2da7ea394b
Add --main flag to specify app/package to resolve deps from 2024-06-07 17:09:44 -03:00
Richard Feldman
78d77e2f59
Revise wildcard and type var error message 2024-05-13 09:55:35 -04:00
Richard Feldman
18230a7a18
Make some reporting tests more editor-friendly
Previously editors would trim the trailing whitespace on save,
breaking the tests.
2024-05-13 08:22:35 -04:00
Richard Feldman
8357bd8c91
Revise errors for undeclared type vars in aliases 2024-05-12 21:20:11 -04:00
Agus Zubiaga
2e4306279c
Handle record update found in module params 2024-05-09 08:01:46 -03:00