Commit graph

483 commits

Author SHA1 Message Date
Luke Boswell
34a3fd9dec
update mono tests 2024-09-29 15:06:15 +10:00
Luke Boswell
760af4a04e
Merge remote-tracking branch 'remote/main' into str-dropping 2024-09-29 14:31:04 +10:00
Stuart Hinson
9745e1931c Dict.update alter fn is passed a Result 2024-09-19 20:46:44 -04:00
Elias Mulhall
19931ecd43
Support passing values into dbg with the pipe operator
In order to desugar `dbg` in a pipeline we need to allow a bare `dbg`
node in desugaring and only report it as an error if the bare node
survives to the next step of canonicalization. This means we move the
error code out of `desugar_expr` and into `canonicalize_expr`. This is
much simpler to do now that these functions use the same `env` struct,
since previously we would have had to pass down extra args to
`canonicalize_expr`. Sharing the `env` struct means that we also don't
have to worry about calculating `line_info` more than once.
2024-09-05 20:13:54 -04:00
Elias Mulhall
82d0566041
Use module scope instead of var store to generate idents in dbg desugar
Fix a bug in `dbg` expression desugaring by using the module scope to
generate unique identifiers instead of the variable store.

In the initial implementation of `dbg` expressions we used the
`VarStore` to generate unique identifiers for new variables created
during desugaring. We should have instead used the current module's
`Scope`, which handles identifiers within the module. Each scope has its
own incrementing variable count which is independent of the shared
variable store. The scope is used to generate new identifiers at other
points in canonicalization, such as when assigning a global identifier
to closures and `expect`s. It's possible that the identifier generated
for `dbg` could conflict with an identifier generated by the scope,
resulting in a confusing error.
2024-09-03 14:00:39 -04:00
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
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
7938e4bdc8
basic-cli 0.15, test fixes 2024-08-28 18:39:15 +02: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
Sam Mohr
12df3a04de
Merge attempt 2024-08-19 23:34:05 -07:00
Luke Boswell
5f67ffe21a
update mono snapshots 2024-08-17 17:23:03 +10:00
Sam Mohr
50f6e11423
Deprecate backpassing to prepare for eventual removal 2024-08-16 22:36:04 -07:00
Luke Boswell
2eb3e38b7f
Merge remote-tracking branch 'remote/main' into result-map-builtins 2024-08-14 17:26:10 +10:00
Luke Boswell
45f18bd64e
update mono snapshots 2024-08-14 13:17:52 +10:00
Agus Zubiaga
762799052e
Merge branch 'main' into typecheck-module-params 2024-08-07 18:55:33 -03:00
Brendan Hansknecht
5dc20e0f4e
update mono tests 2024-07-15 17:25:51 -07:00
Brendan Hansknecht
d4b86a745b
update mono tests 2024-07-13 10:39:57 -07:00
Agus Zubiaga
3841376784
update mono tests after adding import defs 2024-07-06 22:52:38 -03:00
Folkert
047779d981
WIP infer join points too 2024-07-06 16:14:29 +02:00
Folkert
0932c542ca
update mono tests 2024-07-06 16:12:01 +02:00
Folkert
48ddbec9d1
mono tests 2024-07-06 16:08:56 +02: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
67f555feea
test_mono, uitest: rm stdlib Json dependency
use the same tag len fmt introduced in test_gen/gen_abilities tests
2024-07-01 20:36:28 +02:00
Ayaz Hafiz
8cdb193301
Update stale document references 2024-06-26 02:16:20 -04:00
Anton-4
da95b6d28b
Merge pull request #6791 from shua/concatutf8
builtin: List.concatUtf8 : List U8, Str -> Str
2024-06-11 16:21:30 +02:00
Anton-4
18394da2a2
update mono tests 2024-06-10 16:32:53 +02:00
Agus Zubiaga
4e5fdfbf52
Handle root type when loading from str 2024-06-08 19:46:41 -03:00
Richard Feldman
600b0486de
Merge pull request #6711 from andyferris/floating-point-special-values
Floating point special values
2024-05-04 12:01:16 -04:00
Folkert
241d2b565a
update mono tests 2024-05-04 15:59:59 +02:00
JRI98
eebd4b21c3
Support guards on lists with rest 2024-04-30 13:25:18 +01:00
Richard Feldman
ce4501c329
Update mono tests 2024-04-25 23:10:54 -04:00
Anton-4
8f71844c3e
fix example, update mono 2024-04-13 14:26:17 +02:00
Fabian Schmalzried
4586147ee8
fix test-mono 2024-04-01 21:08:15 +02:00
Brendan Hansknecht
6dc5bfb1b7
Use roc_target over target_lexicon
Tailors a target class for our needs.
Replaces tons of uses across the entire compiler.
This is a base for later adding new targets like thumb.
2024-03-31 10:50:26 -07:00
David Dunn
a8839108f8
Update mono test files 2024-03-11 18:59:33 +02:00
Brendan Hansknecht
3c737c19ee
update mono tests 2024-02-29 21:33:32 -08:00
Richard Feldman
12aa775f54
Update mono tests 2024-02-17 13:20:34 -05:00
Richard Feldman
3b55b64ca6
Update mono tests 2024-02-15 06:47:14 -05:00
Richard Feldman
24a38c4a26
Merge remote-tracking branch 'origin/main' into remove-nat 2024-02-11 12:26:36 -05:00
Folkert de Vries
4cbdf08a2d
Merge pull request #6499 from JRI98/fix_6174
Don't skip closure captures when fixing them
2024-02-04 13:57:18 +01:00
Anton-4
b2b55876d3
Merge pull request #6488 from roc-lang/forgot-old-interpolation-syntax
update to new interpolation syntax
2024-02-04 11:03:34 +01:00
JRI98
be30e470a8
Don't skip closure captures when fixing them 2024-02-03 23:19:08 +00:00
JRI98
ad6900514b
Create symbols for struct fields before record update 2024-02-02 23:49:48 +00:00
Anton-4
3c7a834da1
update to new interpolation syntax 2024-02-02 13:39:10 +01:00
Richard Feldman
aabd95404f
Merge remote-tracking branch 'origin/main' into remove-nat 2024-01-30 21:42:45 -05:00
Folkert
21b540751a
force interpolated variables to be of type string 2024-01-30 15:04:56 +01:00