Commit graph

29413 commits

Author SHA1 Message Date
Agus Zubiaga
2469a3aa2d
Merge pull request #7050 from roc-lang/arg-patterns-as 2024-09-02 14:02:17 -03:00
Agus Zubiaga
458878dbea
Fix record as pattern mono test 2024-09-02 12:29:14 -03:00
Agus Zubiaga
e2bd31a549
Add mono tests for opaque pattern with as 2024-09-02 12:23:25 -03:00
Agus Zubiaga
ada24e4fd9
Add mono tests for record pattern with as 2024-09-02 12:17:53 -03:00
Agus Zubiaga
4e19753189
fmt: Use format_with_options Parens for as pattern arguments 2024-09-02 12:02:01 -03:00
Agus Zubiaga
2486ce0e48
fmt: Add parens around as patterns in arguments 2024-09-02 11:54:34 -03:00
Anton-4
2f91688224
test nightly on ubuntu 24
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2024-09-02 15:40:55 +02:00
Anton-4
02cf61f985
Merge pull request #7038 from mulias/expr-dbg
Support `dbg` in expressions
2024-09-02 13:30:32 +02:00
Agus Zubiaga
2679ba3e95
Merge pull request #7048 from roc-lang/fix-task-params-threading 2024-09-01 23:45:40 -03:00
Agus Zubiaga
e4079ccb11
Add module_params_pass_task test 2024-09-01 19:18:07 -03:00
Agus Zubiaga
9ce5b8b50b
Fix zero-arity home value def var 2024-09-01 19:11:56 -03:00
Agus Zubiaga
ed931a458e
Use fresh vars for home params destructures 2024-09-01 19:11:09 -03:00
Sam Mohr
a1c9273721
Merge pull request #7041 from roc-lang/dependabot/npm_and_yarn/crates/compiler/checkmate/www/webpack-5.94.0
Bump webpack from 5.88.1 to 5.94.0 in /crates/compiler/checkmate/www
2024-08-31 17:00:42 -07:00
Sam Mohr
0bc65e1228
Merge pull request #7029 from Ocupe/fix-tutorial
Fix incorrect hash link in tutorial
2024-08-31 17:00:04 -07:00
Jonas Schell
40417b1710
Fix incorrect hash link in tutorial 2024-08-31 22:42:35 +02:00
Anton-4
835ab1a203
Merge pull request #7043 from roc-lang/update-to-basic-cli-15
update to basic cli 15
2024-08-31 15:22:11 +02:00
Anton-4
908656d43c
update docs link
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2024-08-31 14:36:55 +02:00
Anton-4
e7a44430fd
update to basic cli 15 2024-08-31 14:30:07 +02:00
dependabot[bot]
8c5f01b405
Bump webpack from 5.88.1 to 5.94.0 in /crates/compiler/checkmate/www
Bumps [webpack](https://github.com/webpack/webpack) from 5.88.1 to 5.94.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.88.1...v5.94.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-30 16:13:58 +00:00
Sam Mohr
f6c969af29
Merge pull request #7009 from roc-lang/lower-module-params
Lower module params
2024-08-30 09:12:39 -07:00
Anton-4
3c679f6338
Merge branch 'main' into lower-module-params 2024-08-30 16:29:46 +02:00
Anton-4
e619f6081d
Merge pull request #6836 from smores56/builtin-task
Add Task as a built-in module/type
2024-08-30 16:28:45 +02:00
Sam Mohr
3f866d93ae
Ignore false-interpreter test, unrelated issue 2024-08-29 19:50:03 -07:00
Sam Mohr
9263986433
Fix discordant u8 and u64 types 2024-08-29 19:04:06 -07:00
Sam Mohr
e310ba8494
Merge branch 'main' into builtin-task 2024-08-29 18:58:04 -07:00
Sam Mohr
74f9b99388
Use HashMap to store false-interpreter files 2024-08-29 18:42:58 -07: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
14fabdff07 Double the amount of indentation allowed in parser trace debugging
Increase from 36 levels of indentation to 80. This is excessive, but
it's confusing to have a parser test crash just because
parse_debug_trace is enabled.
2024-08-29 07:25:42 -04:00
Elias Mulhall
fefb4a3115 Don't use debug formatting to convert Variable into string 2024-08-28 12:51:02 -04:00
Anton-4
7938e4bdc8
basic-cli 0.15, test fixes 2024-08-28 18:39:15 +02:00
Elias Mulhall
7a07f13f31 Test dbg expr desugaring 2024-08-28 12:16:22 -04:00
Elias Mulhall
4cf214869e Extract helper functions for desugaring dbg statements and expressions
This reduces code duplication because `desugar_dbg_expr` calls
`desugar_dbg_stmt`. We will also reuse these functions for desugaring
dbg in pipelines.
2024-08-28 11:53:44 -04:00
Elias Mulhall
2242e9b2c3 Remove error handling for dbg in expression position 2024-08-28 11:53:44 -04:00
Elias Mulhall
9dae102603 Allow dbg expression inside string interpolation 2024-08-28 11:53:44 -04:00
Elias Mulhall
220bb55048 Desugar dbg expression into a dbg statement
Use a temporary variable to print and then return the body of the dbg
expression.
2024-08-28 11:53:44 -04:00
Elias Mulhall
335265e15c Parse dbg in expression position
Add dbg parsing logic everywhere we parse normal expressions. Add
special case to statement parsing to handle a series of statements
ending in a `dbg` in expression position.

Rename existing `dbg_help` function to `dbg_stmt_help`, similarly rename
syntax snapshot test files to specify which ones are for dbg statements.
2024-08-28 11:53:44 -04:00
Elias Mulhall
43d932df3b Update parser AST to support dbg as both a statment and expression
Make `Expr::Dbg` node specific to dbg expressions, add `Expr::DbgStmt`
for dbg statements. Debug expressions don't have a continuation branch.
Support formatting both kinds of `Dbg` nodes.
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
Elias Mulhall
dc5c8aeaf9 cargo fmt --all 2024-08-28 11:53:44 -04:00
Elias Mulhall
3120a1ea46 Replace panic! with internal_error! 2024-08-28 11:53:44 -04:00
Anton-4
479feca396
Merge pull request #7037 from roc-lang/roc-check-tip
add roc check tip
2024-08-28 17:31:10 +02:00
Anton-4
c897f5ec79
remove sort.roc 2024-08-28 16:38:41 +02:00
Anton-4
ca7d1cb3fa
Revert "Avoid defining unsized platform Tasks"
This reverts commit d3732b4440.
2024-08-28 16:37:01 +02:00
Agus Zubiaga
287a8fa2e7
Merge branch 'main' into lower-module-params 2024-08-28 08:50:40 -03:00
Agus Zubiaga
b2bcf8f988
Restore ErrorType Debug impl 2024-08-27 19:43:33 -03:00
Agus Zubiaga
ad27129fd7
Rename todo with comment 2024-08-27 19:19:30 -03:00
Agus Zubiaga
e4352b913f
Do not remove params from errors in check mode 2024-08-27 19:11:50 -03:00
Agus Zubiaga
d033057a58
Hide params from annotation type mismatches 2024-08-27 19:06:31 -03:00
Agus Zubiaga
a4f4d00ff0
Add unexpected fn params test case 2024-08-27 17:24:13 -03:00
Agus Zubiaga
dd78b8e25b
Add TOO FEW ARGS test case for params 2024-08-27 17:08:55 -03:00