Commit graph

521 commits

Author SHA1 Message Date
Anton-4
c93e27ca9a
added List.keep_if_try! (#7804)
* added keep_if_try!

* cleanup types

* cleanup var name
2025-05-21 14:12:24 -05:00
Anton-4
882577bebc
added map_try! + walk_try! test (#7770)
* map_try! + walk_try! test

* update mono tests
2025-04-29 22:05:12 +02:00
Lars Frogner
560171c238
Add Num.[f32,f64,dec]_[to,from]_bits builtins and deprecate Num.[f32,f64]_[to,from]_parts (#7741)
* Add `Num.[f32,f64,dec]_[to,from]_bits` builtins

* Update mono tests

* Deprecate `Num.[f32,f64]_[to,from]_parts`
2025-04-18 10:10:45 +02:00
Anton-4
1570a3df10
Add Str.len stub (#7732)
* Add Str.len stub

* mono update
2025-04-09 12:19:34 +02:00
Anton-4
05a5eaf124
update mono 2025-01-28 18:16:00 +01:00
Norbert Hajagos
fc0a9ec4cf
add with_ascii_uppercased and caseless_ascii_equals to Str 2025-01-23 15:21:11 +01:00
shua
359b3d5883
update mono tests 2025-01-20 19:19:43 +01:00
Norbert Hajagos
f372e18600
update mono tests 2025-01-20 11:02:59 +01:00
Norbert Hajagos
8403f1ea19
with_ascii_lowercased zig builtin 2025-01-20 10:58:41 +01:00
Sam Mohr
fce14d31b0
Move desugaring to new roc_can_solo crate 2025-01-19 07:16:43 -08:00
Anton-4
b2e3adf508
proc sort fix #7531 #7514 #7496 2025-01-18 23:15:18 +01:00
Sam Mohr
b8de09d048
Update tests 2025-01-17 19:10:20 -08:00
Sam Mohr
a292e070d4
Prefer and and or for boolean operators 2025-01-17 16:15:31 -08:00
Ian McLerran
326558337c
update mono tests 2025-01-15 19:55:26 -06:00
Sam Mohr
eb1b5ffa26
Move to new interpolation syntax 2025-01-10 10:29:20 -08:00
Ian McLerran
541fb6056c
update mono tests 2025-01-09 13:53:01 -06:00
Sam Mohr
2010ada504
Fix mono tests 2025-01-08 17:15:23 -08:00
Sam Mohr
3d4c302807
Fix tests 2025-01-07 14:01:03 -08:00
Sam Mohr
7a2f8bfa71
Merge branch 'main' into auto-snake-case 2025-01-07 13:18:41 -08:00
Luke Boswell
8540aa1a14
Merge pull request #7321 from shua/fromutf8
DO NOT MERGE update Str.fromUtf8 error type
2025-01-08 07:56:40 +11:00
Timon
716374cfc0
Fixed Issue #6929 Escape unicode when inspecting a Str (#7411)
* Fixed Issue #6929 Escape unicode when inspecting Str

added AUTHORS

improved comment

* update generated mono tests

* fixed formatting

* fixed merge conflicts
2025-01-06 18:52:50 +01:00
Sam Mohr
83b8b0e557
Update uitests 2025-01-05 21:25:22 -08:00
Sam Mohr
b56fbd38e1
Progress on updating entire compiler for snake_case 2025-01-05 03:48:03 -08:00
Ian McLerran
c360fca87e
update mono tests 2025-01-03 13:58:24 -06:00
Jared Ramirez
7daa008a9a
Add Num.fromBool 2024-12-24 10:10:20 -05:00
Anton-4
63abc4bb01
Merge branch 'main' into fromutf8 2024-12-23 11:29:59 +01:00
faldor20
a7308130cf
clippy on everything 2024-12-12 20:54:25 +10:00
faldor20
81f2095e61
basic working
compiling, but still missing positions from expression errors
2024-12-12 20:54:25 +10:00
shua
bf2895237d
update mono tests 2024-12-08 23:09:47 +01:00
Sam Mohr
eedade8e81
Initial working version of proper try keyword 2024-12-04 02:31:59 -08:00
Luke Boswell
fdaaca8c8b
replace cargo deps with workspace in lower_parms, module, mono, parse, problem, roc_target, serialize, solve, solve_problem, specialize_types, test_* 2024-11-29 11:29:04 +11:00
Sam Mohr
f857872903
Properly type constrain all function types 2024-11-21 04:09:47 -08:00
Isaac Van Doren
d99c347998
rename Str.split 2024-11-15 21:12:23 -06:00
Isaac Van Doren
9a14991c8f
update mono tests 2024-11-12 21:58:00 -06:00
Luke Boswell
9c1fe2c839
update mono 2024-11-13 10:46:34 +11:00
Agus Zubiaga
ca7697db91
update mono tests: ids increase because of new fx vars 2024-11-07 18:54:22 -03:00
Sam Mohr
66cc96edbb
Address PR comments from @ayazhafiz 2024-10-29 15:58:35 -07:00
Sam Mohr
01369dc6d8
Add mono tests to validate refcounts with early return 2024-10-24 22:56:03 -07:00
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