Commit Graph

7738 Commits

Author SHA1 Message Date
Sahil Mahapatra
b2ceeb47d9 removed all the mentions of Num.format 2023-12-13 18:51:01 +05:30
Anton-4
384cf2decf
add __udivti3 to must_keep
Fixes Undefined Symbol in relocation...
2023-12-13 12:09:15 +01:00
Brendan Hansknecht
43cfcaef64
Merge pull request #6263 from roc-lang/fix-nightlies-try-2
Re-enable early DCE with fix for M1 mac
2023-12-13 01:13:07 -08:00
Bryce Miller
99e596c4a0
don't run test for gen_wasm 2023-12-12 20:54:27 -05:00
Bryce Miller
fdd6bb6006
Merge branch 'main' into list-walk-with-index-until 2023-12-12 17:57:46 -05:00
Folkert de Vries
d4a1dbc2d6
Merge pull request #6232 from roc-lang/roc-std-slices
expose list/string slices to rust users
2023-12-12 23:24:03 +01:00
Brendan Hansknecht
ec6d8142e7
Re-enable early DCE with fix for M1 mac
I won't claim to know why `__muloti4` is special, but none of the other compiler-rt functions are,
but seems to work and stop tests from hanging.

It also enables early DCE again which saves a tiny bit of compile time.
2023-12-12 10:43:14 -08:00
Folkert
ee1dd2cd14
disable a glue test that segfaults 2023-12-12 19:35:51 +01:00
Bryce Miller
8dbdd308c7
re-run test-mono 2023-12-12 07:56:30 -05:00
Bryce Miller
2db4cae9d1
Merge branch 'main' into list-walk-with-index-until 2023-12-12 07:54:42 -05:00
Bryce Miller
80dd0b6b93
run test_mono 2023-12-12 07:42:18 -05:00
Luke Boswell
1051ba6569
cargo fmt 2023-12-12 21:15:17 +11:00
Folkert
f570444901
always slice a big string as a slice (not as a small string) 2023-12-12 10:49:21 +01:00
Folkert
37ef3549c8
rename field name 2023-12-12 10:45:53 +01:00
Folkert
f742d50379
changes after review 2023-12-12 10:45:53 +01:00
Folkert
9865096c24
expose list/string slices to rust users 2023-12-12 10:45:53 +01:00
Bryce Miller
89febf52bc
Merge branch 'main' into list-walk-with-index-until 2023-12-11 23:13:21 -05:00
Bryce Miller
59eb28ef58
Add builtin List.walkWithIndexUntil 2023-12-11 23:04:40 -05:00
Brendan Hansknecht
0e842fd844
update formatting, uitest, and mono_test 2023-12-11 18:22:53 -08:00
Brendan Hansknecht
65ce79c1c5
correct Dict.update to use proper index 2023-12-11 15:35:19 -08:00
Richard Feldman
95a4bb988c
Merge pull request #6255 from roc-lang/glue-panic-handler
make glue use a setjmp/longjmp panic handler
2023-12-11 16:33:26 -05:00
Richard Feldman
67d7385b9a
Clean up some obsolete asserts 2023-12-11 15:15:59 -05:00
Folkert
d2d87949c8
remove random write to pointer 2023-12-11 21:07:15 +01:00
Richard Feldman
5aab05aede
Change Running program... message in glue 2023-12-11 14:36:37 -05:00
Richard Feldman
e1697a910c
cargo fmt 2023-12-11 14:35:49 -05:00
Folkert
590282b14f
make glue use a setjmp/longjmp panic handler 2023-12-11 20:33:21 +01:00
Brendan Hansknecht
fb049b661a
Remove early DCE of builtins
Early DCE was sometimes cleaning up functions that we actaully still needed.
At some point we can come back to it and try to properly protect all special functions.
Until then, this still enables DCE, but it runs later with the full generated Roc module.
2023-12-11 10:44:57 -08:00
Luke Boswell
4d6546f5b0
fixes for Windows gen_num 2023-12-11 22:10:34 +11:00
Brendan Hansknecht
3120dee509
Merge pull request #6238 from roc-lang/dict-follow-up
Dict follow up and addition of releaseExcessCapacity
2023-12-11 02:15:44 -08:00
Brendan Hansknecht
ec3b916c8f
Merge pull request #6249 from roc-lang/refcount-ptr-naming-cleanup
Cleanup list and str builtin naming from refcount to allocation
2023-12-11 00:19:35 -08:00
Brendan Hansknecht
f262102299
cleanup list and str builtin naming from refcount to allocation 2023-12-10 19:52:28 -08:00
Brendan Hansknecht
156a462f1d
update uitest and mono_test 2023-12-10 11:24:22 -08:00
ptaszor3
58b73ae257
Fixed some formatting 2023-12-10 19:58:23 +01:00
Luke Boswell
648ccd463d
handle TrailingOperator error 2023-12-10 19:58:23 +01:00
Brendan Hansknecht
199e84e91e
add some missed symbols that roc needs 2023-12-10 19:58:22 +01:00
Brendan Hansknecht
eeeccfb143
fix dce of compiler-rt 2023-12-10 19:58:22 +01:00
Brendan Hansknecht
75aa84f825
Remove hashflooding comment
I think for now it is not worth considering adding hashflooding mitigation to the Roc Dict.
1. Wyhash is a secure enough has to pass SMHasher.
2. Languages like Go use wyhash in production and have not seen hashflooding issues.
3. We do have a random seed that Dicts use that changes per application linking. (Could monomorphize on Dict type for more randomness)
4. Any sort of fallback checks will lead to worse performance in the normal case.
5. A reasonable http server or app can limit the size of JSON or number of HTTP headers to accept.
2023-12-10 19:58:21 +01:00
Brendan Hansknecht
bd69058659
update ingested windows compiler-rt symbols 2023-12-10 19:58:21 +01:00
Brendan Hansknecht
279ea48def
tell windows that we use floats? 2023-12-10 19:58:20 +01:00
Brendan Hansknecht
a86cd28d1d
wasm is not friends with compiler-rt 2023-12-10 19:58:20 +01:00
Brendan Hansknecht
5ec5f63a19
libc is a lie, tell bitcode that roc targets a world where libc might not exist 2023-12-10 19:58:20 +01:00
Brendan Hansknecht
27eea90bc3
correct wrong test case 2023-12-10 19:58:19 +01:00
Brendan Hansknecht
2d0ba0a792
remove all compiler-rt and libc code ports from zig bitcode 2023-12-10 19:58:19 +01:00
Brendan Hansknecht
4c76a224b5
bundle compiler-rt through zig 2023-12-10 19:58:19 +01:00
Brendan Hansknecht
8d8e498f11
remove unnecessary call to math.floor in bitcode 2023-12-10 19:58:18 +01:00
Brendan Hansknecht
c902a01c99
update uitest and mono_test 2023-12-10 19:58:18 +01:00
Brendan Hansknecht
e877c22935
fix Dict.listGetUnsafe to map to low level without wrapping 2023-12-10 19:58:17 +01:00
Brendan Hansknecht
3aa9908cb3
Swap Dict implementation to ankerl dense unordered
ankerl::dense_unordered is a very fast hash map that is built to be an index map.
This enables extra optimizations compared to just wrapping a regular hash map.
As such, I think this map is very well suited for our index map impl in Roc.
I also think this dictionary implementation is simpler overall.
On top of that, this removes the need for SIMD instructions for peak performance.

Benchmarks of the C++ version and other C++ hash maps are here: https://martin.ankerl.com/2022/08/27/hashmap-bench-01/
Though this has clear bias of being written by the author of ankerl::dense_unordered,
the results all look correct and the benchmarks thorough.
2023-12-10 19:58:17 +01:00
JRI98
3a86f5de22
Fix format for the 'as' keyword 2023-12-10 19:58:16 +01:00
ptaszor3
7162fbddd3
Fixed the multiline dbg formatting 2023-12-10 19:58:09 +01:00
ptaszor3
6a6d5cebc0
resolved issue 6188 and added some tests 2023-12-10 19:57:49 +01:00
Anton-4
f795d0856a
Merge pull request #6228 from lukewilliamboswell/fix-6227
Handle TrailingOperator parse error
2023-12-10 17:12:29 +01:00
Brendan Hansknecht
b39d604745
Dict follow up and addition of releaseExcessCapacity 2023-12-10 00:06:58 -08:00
Brendan Hansknecht
1ad9933b38
add some missed symbols that roc needs 2023-12-09 18:33:23 -08:00
Brendan Hansknecht
e621de328d
fix dce of compiler-rt 2023-12-09 18:11:23 -08:00
Brendan Hansknecht
ba28ba7ca3
Remove hashflooding comment
I think for now it is not worth considering adding hashflooding mitigation to the Roc Dict.
1. Wyhash is a secure enough has to pass SMHasher.
2. Languages like Go use wyhash in production and have not seen hashflooding issues.
3. We do have a random seed that Dicts use that changes per application linking. (Could monomorphize on Dict type for more randomness)
4. Any sort of fallback checks will lead to worse performance in the normal case.
5. A reasonable http server or app can limit the size of JSON or number of HTTP headers to accept.
2023-12-09 18:11:23 -08:00
Brendan Hansknecht
28e4ae8ae5
update ingested windows compiler-rt symbols 2023-12-09 18:11:22 -08:00
Brendan Hansknecht
cd42ed629a
tell windows that we use floats? 2023-12-09 18:11:22 -08:00
Brendan Hansknecht
3dc1389cdd
wasm is not friends with compiler-rt 2023-12-09 18:11:22 -08:00
Brendan Hansknecht
8aa68ccf8e
libc is a lie, tell bitcode that roc targets a world where libc might not exist 2023-12-09 18:11:22 -08:00
Brendan Hansknecht
c87dcd1205
correct wrong test case 2023-12-09 18:11:22 -08:00
Brendan Hansknecht
797ba64003
remove all compiler-rt and libc code ports from zig bitcode 2023-12-09 18:11:22 -08:00
Brendan Hansknecht
be06599bb6
bundle compiler-rt through zig 2023-12-09 18:11:22 -08:00
Brendan Hansknecht
f738d5a2bf
remove unnecessary call to math.floor in bitcode 2023-12-09 18:11:22 -08:00
Brendan Hansknecht
d202b77ae1
update uitest and mono_test 2023-12-09 18:11:22 -08:00
Brendan Hansknecht
65c5a490b8
fix Dict.listGetUnsafe to map to low level without wrapping 2023-12-09 18:11:22 -08:00
Brendan Hansknecht
51ec4311b5
Swap Dict implementation to ankerl dense unordered
ankerl::dense_unordered is a very fast hash map that is built to be an index map.
This enables extra optimizations compared to just wrapping a regular hash map.
As such, I think this map is very well suited for our index map impl in Roc.
I also think this dictionary implementation is simpler overall.
On top of that, this removes the need for SIMD instructions for peak performance.

Benchmarks of the C++ version and other C++ hash maps are here: https://martin.ankerl.com/2022/08/27/hashmap-bench-01/
Though this has clear bias of being written by the author of ankerl::dense_unordered,
the results all look correct and the benchmarks thorough.
2023-12-09 18:11:22 -08:00
Luke Boswell
f837870a63
handle TrailingOperator error 2023-12-09 19:42:09 +11:00
JRI98
0599066865
Fix format for the 'as' keyword 2023-12-07 10:46:58 +00:00
Luke Boswell
5652d4ec18
Merge pull request #6211 from roc-lang/zig-glue
Initial template for Zig glue
2023-12-07 14:11:43 +11:00
Luke Boswell
61a55ad79d
make a start 2023-12-07 11:25:02 +11:00
Anton-4
c4c1e66d1c
Merge pull request #6209 from roc-lang/remove-max-nat-mention
Num.maxNat does not exist
2023-12-06 20:44:49 +01:00
Richard Feldman
6f0857d7da
Merge pull request #6202 from roc-lang/substring-slices
Create seamless slices when getting a substring
2023-12-06 14:31:01 -05:00
Brendan Hansknecht
ca71409a76
add comment on slice construction 2023-12-06 11:26:52 -08:00
Anton-4
e16f2bbc01
Num.maxNat does not exist
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2023-12-06 18:19:27 +01:00
Richard Feldman
0179aa4e72
Merge pull request #6192 from roc-lang/exit-repl
Make it easier to exit `roc repl`
2023-12-06 09:20:48 -05:00
Brendan Hansknecht
81eff6a23f
Merge pull request #6176 from roc-lang/set-perf
Improve perf of Dict and Set
2023-12-06 02:02:01 -08:00
Brendan Hansknecht
087ca115c9
create seamless slices when getting a substring 2023-12-05 22:46:43 -08:00
Brendan Hansknecht
9889984dd4
Merge pull request #6193 from horriblename/Fix-typos
Fix typos
2023-12-05 15:31:11 -08:00
Brendan Hansknecht
86eae30247
Merge pull request #6182 from CrepeGoat/patch-1
Update Num.roc - fix docstring typos
2023-12-05 14:28:39 -08:00
Brendan Hansknecht
64df1c6921
update uitest and mono_test 2023-12-05 14:13:18 -08:00
Brendan Hansknecht
a2cc17e8e9
write keepShared in a way that doesn't break dev-wasm 2023-12-05 14:12:10 -08:00
Brendan Hansknecht
37656f4cc0
update uitest and mono_test 2023-12-05 12:45:31 -08:00
Brendan Hansknecht
87b31a581e
roc format 2023-12-05 12:37:12 -08:00
Brendan Hansknecht
3f50f78eba
update tests and Dict.keepShared semantics 2023-12-05 12:37:12 -08:00
Brendan Hansknecht
a0854a10e7
optimize set intersection and union 2023-12-05 12:37:12 -08:00
Brendan Hansknecht
35146d1a0b
remove redundant size attribute 2023-12-05 12:37:11 -08:00
Brendan Hansknecht
b9ef582c26
correct size to avoid rehash 2023-12-05 12:37:11 -08:00
Brendan Hansknecht
7e04c1f58c
use constants to avoid new allocations in Dict.empty 2023-12-05 12:37:11 -08:00
Brendan Hansknecht
f31a4070e4
implement Dict.withCapacity and improve Dict.fromList 2023-12-05 12:37:11 -08:00
Brendan Hansknecht
6692f5b15d
correct counting bits to return a u8
Also add an impl to the dev backend
2023-12-05 12:37:10 -08:00
Brendan Hansknecht
e336aa525c
Merge pull request #6062 from JRMurr/div-0-should-crash
Update zig `@panic` calls to `roc_panic` for numeric errors
2023-12-05 12:28:47 -08:00
Ching Pei Yang
8c7bc6455e
Fix typos 2023-12-05 20:03:19 +01:00
Richard Feldman
d35c578924
Make it easier to exit roc repl 2023-12-05 12:30:31 -05:00
Anton-4
70c032731b
Merge pull request #6173 from zapsh/6109-handle-download-404
Improving error messages when encountering a 404 while fetching a platform
2023-12-05 16:55:48 +01:00
Anton-4
a57f29e780
Merge pull request #6184 from roc-lang/debug-info
Fix debug info
2023-12-05 14:03:52 +01:00
andreystepanov
1620fb54c2
Fixed wrapping for long words to avoid horizontal scroll 2023-12-05 12:05:55 +02:00
LoipesMas
00839e12b5 Run roc format 2023-12-05 00:24:08 +01:00
LoipesMas
a9196a9abb Add more generated files 2023-12-05 00:18:32 +01:00
LoipesMas
4225c9e8c7 Add generated test files 2023-12-05 00:10:02 +01:00
LoipesMas
d4a8208069 Add more test cases 2023-12-05 00:04:13 +01:00
Brendan Hansknecht
749faf4850
a few missed variable renames 2023-12-04 14:57:47 -08:00
LoipesMas
83ac8209ae Add Dict.keepIf, Dict.dropIf, Set.keepIf, Set.dropIf 2023-12-04 23:38:51 +01:00
Brendan Hansknecht
05c1b6c583
more debug info corrections 2023-12-04 14:27:02 -08:00
Brendan Hansknecht
dbcb6ca5da
clippy 2023-12-04 13:53:56 -08:00
Brendan Hansknecht
fc09c3b002
remove debugir 2023-12-04 13:50:53 -08:00
Brendan Hansknecht
034b86973b
keep stripping zig debug info to avoid 250ms cost 2023-12-04 13:38:25 -08:00
Brendan Hansknecht
da301df37b
separate emitting debug info from emitting llvm-ir 2023-12-04 13:13:30 -08:00
Brendan Hansknecht
496cd6710a
fix debug info and add it all to the llvm backend 2023-12-04 12:55:33 -08:00
Anton-4
0259b892da
fmt 2023-12-04 19:19:13 +01:00
Becker A
82ed520b98
Update Num.roc
undid bad change

Signed-off-by: Becker A. <awqatty.b@gmail.com>
2023-12-04 10:56:29 -07:00
Becker A
88d9d2d81b
Update Num.roc
fixed docstring typos

Signed-off-by: Becker A. <awqatty.b@gmail.com>
2023-12-04 10:55:26 -07:00
Becker A
f420e518d5
Update Num.roc
fixed docstring typo

Signed-off-by: Becker A. <awqatty.b@gmail.com>
2023-12-04 10:54:17 -07:00
Becker A
779b948772
Update Num.roc
fixed typos

Signed-off-by: Becker A. <awqatty.b@gmail.com>
2023-12-04 10:46:55 -07:00
Anton-4
0e030256d9
change wording a bit 2023-12-04 17:15:12 +01:00
zapsh
91d0de75ab
adding initial 404 handling 2023-12-03 17:07:25 -05:00
Brendan Hansknecht
e1c850e2d1
update uitest and mono_test 2023-12-03 12:41:04 -08:00
Brendan Hansknecht
e5a0af5699
make DbgFormatter an unexposed implementation detail 2023-12-03 12:41:04 -08:00
Brendan Hansknecht
b04699acdf
change debug to call Inspect.inspect instead of inlining it
This is to workaround #6167 and can be reverted once it is fixed
2023-12-03 09:51:55 -08:00
Brendan Hansknecht
e8d2deca90
fix off by one in roc_dbg 2023-12-03 08:22:04 -08:00
Brendan Hansknecht
f4fceb232c
fix test after rebase on main 2023-12-02 21:21:10 -08:00
Brendan Hansknecht
787d7f85ac
switch dbg arg ordering to make it backwards compatible 2023-12-02 21:18:32 -08:00
Brendan Hansknecht
6c60da2832
add dbg impl for use with roc test 2023-12-02 21:18:32 -08:00
Brendan Hansknecht
546e0778c4
update dbg cli test 2023-12-02 21:18:32 -08:00
Brendan Hansknecht
602b92d98c
re-add no longer broken glue tests 2023-12-02 21:18:32 -08:00
Brendan Hansknecht
be17c0cadb
load world abilities sooner 2023-12-02 21:18:32 -08:00
Brendan Hansknecht
5e8974177c
avoid bloating parse expr size 2023-12-02 21:18:32 -08:00
Brendan Hansknecht
d2a3caacbb
fix missed roc_dbg 2023-12-02 21:18:32 -08:00
Brendan Hansknecht
6134ce0a3b
update inspect_logging test case 2023-12-02 21:18:32 -08:00
Brendan Hansknecht
13d2238536
update roc_dbg in platforms 2023-12-02 21:18:31 -08:00
Brendan Hansknecht
3966d63e2f
add src and location to dbg 2023-12-02 21:18:31 -08:00
Brendan Hansknecht
4587c4ebc5
update uitest and mono_test 2023-12-02 21:18:31 -08:00
Brendan Hansknecht
4072a2a745
attempt to switch to inlined Inspect.inspect in autoderive 2023-12-02 21:18:31 -08:00
Brendan Hansknecht
4c2eb8b378
Change the generated inspect for Opaque types to print (@Opaque payload) 2023-12-02 21:18:30 -08:00
Ayaz
0955efac5f
Merge pull request #6160 from CrepeGoat/patch-2
Update Decode.roc
2023-12-02 21:02:46 -06:00
Ayaz
20bcd70ad2
Merge branch 'main' into div-0-should-crash 2023-12-02 20:10:32 -06:00
Ayaz
aaba3f4d82
Merge branch 'main' into clippy-1.74 2023-12-02 20:09:06 -06:00
Becker A
14e04d65cf
Update Decode.roc
fixed typo

Signed-off-by: Becker A. <awqatty.b@gmail.com>
2023-12-02 18:33:17 -07:00
Brendan Hansknecht
5dd0bdebc9
support seamless slice in expects 2023-12-02 15:57:53 -08:00
Brendan Hansknecht
edaa600274
Merge branch 'main' into feat-download-progress 2023-12-01 22:03:02 -08:00
Brendan Hansknecht
e65f14fa49
Merge pull request #6090 from Gungy2/5830
Add `log` function to `Dec`
2023-12-01 22:02:35 -08:00
Richard Feldman
421f8d9c5c
Fix Str.walkUtf8 docs 2023-12-01 20:49:58 -05:00
Brendan Hansknecht
738098bfd0
Merge branch 'main' into 5830 2023-12-01 16:37:33 -08:00
Ching Pei Yang
7290e5fcce
Merge branch 'main' into feat-download-progress 2023-12-01 19:53:02 +01:00
Ching Pei Yang
6f3588186c
Print download progress to stderr instead 2023-12-01 19:48:36 +01:00
Anton-4
590140f182
Revert "Merge pull request #6113 from JRMurr/nix-build-file-sets"
This reverts commit f7841f0d1c, reversing
changes made to b4506a4dac.
2023-12-01 18:48:12 +01:00
Anton-4
dc37b7a31d
Merge pull request #6132 from roc-lang/use-basic-cli-7
use latest basic-cli
2023-12-01 16:37:04 +01:00
Anton-4
f7841f0d1c
Merge pull request #6113 from JRMurr/nix-build-file-sets
Use nix file set API to reduce how often we will need to rebuild
2023-12-01 15:57:15 +01:00
Anton-4
b4506a4dac
Merge pull request #6095 from CrepeGoat/patch-1
Fixed `roc format --stdin --stdout` to format output
2023-12-01 15:27:05 +01:00
Anton-4
cc8966e37d
Update ingested_file_bytes test
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2023-12-01 12:49:31 +01:00
Anton-4
a050933955
use latest basic-cli 2023-12-01 12:33:09 +01:00
Ayaz Hafiz
a53da2bc24
Make sure late specializations of opaques inherit Inspect as needed
A "late specialization" of a type is an ability specialization that
is not visible or needed until after type-specialization; i.e. during
monomorphization.

The `Inspect.toInspector` ability is special-cased for opaques that do
not claim or explicitly implement `Inspect`. In such cases, they are
treated as structural types, and given the immediate specialization of
`Inpect.inspectOpaque`.

However, prior to this commit, that special-casing would only be applied
during early specialiation (i.e. specializations visible during
generalized type inference). This commit applies the special case to
late specialization as well - the specialization decision for an opaque
type is always the specialization of the opaque type in the late case,
but now, when we go to look up the ambient lambda set of the
specialization, if it does not exist and corresponds to
`Inspect.toInspector`, we fall back to the immediate.

One concern I have here is that in a case like

```
Op := {}

x =
    dbg (@Op {})
```

the specialization of `Inspect.toInspector` for `Op` should be known
early. Indeed, the program

```
Op := {}

x =
    Inspect.toInspector (@Op {}) |> Inspect.apply (Inspect.init {}) |> Inspect.toDbgStr
```

Compiles fine without this change. This makes me suspect there is an
issue with the implementation of `dbg`'s desugaring. If possible, this
should be addressed sooner rather than later.

Closes #6127
2023-11-30 22:25:08 -06:00
Ching Pei Yang
f2f58b062d
Remove unneeded println arg 2023-11-30 16:17:38 +01:00
Brendan Hansknecht
9f1f0610d1
disable flaky glue test for now 2023-11-29 23:17:11 -08:00
Brendan Hansknecht
7b53f08e75
hopefully fix glue platform exit code issue 2023-11-29 22:45:12 -08:00
Brendan Hansknecht
88106d1659
add basic roc_dbg impl to c platforms 2023-11-29 22:02:27 -08:00
Brendan Hansknecht
3e66254b25
update zig and rust platforms to have correct roc_panic and roc_dbg 2023-11-29 21:49:34 -08:00
Becker A
c5ad8da2c0
Merge branch 'main' into patch-1 2023-11-29 22:09:12 -07:00
Brendan Hansknecht
1f14aa84a2
misc cleanup suggestions 2023-11-29 21:05:56 -08:00
Brendan Hansknecht
b62c9667d5
Correct typo
Co-authored-by: Ayaz <20735482+ayazhafiz@users.noreply.github.com>
Signed-off-by: Brendan Hansknecht <Brendan.Hansknecht@gmail.com>
2023-11-29 21:05:49 -08:00
Brendan Hansknecht
f5fb01fd53
Get tests passing
Add roc_dbg to some platforms.
Also start updating some roc_panic impls.
2023-11-29 21:05:49 -08:00
Brendan Hansknecht
e6cc43492a
rip out old dbg and setup reasonable base debug location info 2023-11-29 21:05:49 -08:00
Brendan Hansknecht
3d6c140a30
get minimal roc_dbg working 2023-11-29 21:05:49 -08:00
Brendan Hansknecht
b7f72eff86
add basic Dbg desugaring and LowLevelDbg 2023-11-29 21:05:48 -08:00
Richard Feldman
10470f33cc
Fix mono tests 2023-11-29 21:02:37 -05:00
Becker A
1cf2a4e738
Merge branch 'main' into patch-1 2023-11-29 18:17:02 -07:00
Brendan Hansknecht
ead90313d8
Merge pull request #5775 from roc-lang/inspect-derive
Derive Inspect
2023-11-29 08:22:27 -08:00
John Murray
3fed1ba129
filter out test folders in nix build 2023-11-28 23:07:25 -05:00
John Murray
298f93d20c
update a bunch of panic message to be capitalized 2023-11-28 20:46:09 -05:00
John Murray
d37dd442f5
undo change in debug server 2023-11-28 20:22:42 -05:00
John Murray
d6f0709296
feedback: update some panic messages 2023-11-28 20:21:56 -05:00
Brendan Hansknecht
248976d632
fix wasm tests 2023-11-28 16:40:43 -08:00
Brendan Hansknecht
c49046291a
misc cleanup suggestions 2023-11-28 16:40:43 -08:00
Brendan Hansknecht
1b7fdc9522
deal with Frac * -> Dec 2023-11-28 16:40:43 -08:00
Brendan Hansknecht
01032c3b11
remove empty list test case for inspect 2023-11-28 16:40:43 -08:00
Brendan Hansknecht
4b911524ac
update gen_abilities tests to include edge case 2023-11-28 16:40:43 -08:00
Brendan Hansknecht
0586f2bac0
more formatting 2023-11-28 16:40:43 -08:00
Brendan Hansknecht
77e55c88bf
update cli logging test 2023-11-28 16:40:43 -08:00
Brendan Hansknecht
759fa9b7a6
roc format 2023-11-28 16:40:42 -08:00
Brendan Hansknecht
83bf3cbd3a
update tests 2023-11-28 16:40:42 -08:00
Brendan Hansknecht
9b181e1b3f
add inspect implementation for dict and set 2023-11-28 16:40:42 -08:00
Brendan Hansknecht
79a58843b5
fix mono tests with wrapping custom function 2023-11-28 16:40:42 -08:00
Brendan Hansknecht
32c3d49e85
ignore unimlemented ability test case 2023-11-28 16:40:42 -08:00
Brendan Hansknecht
153b4c6df1
add walk function to list autoderive 2023-11-28 16:40:42 -08:00
Brendan Hansknecht
21b68a2e27
add a set of currently failing mono tests for inspect 2023-11-28 16:40:42 -08:00
Brendan Hansknecht
5e36395369
correct Inspect custom impl to use Inspect.apply 2023-11-28 16:40:42 -08:00
Brendan Hansknecht
4c25c60cdc
expand ui tests for inspect 2023-11-28 16:40:41 -08:00
Brendan Hansknecht
c443bdcf4f
check_adhoc for inspect 2023-11-28 16:40:41 -08:00
Brendan Hansknecht
82cda1965c
use INSPECT_INSPECT_ABILITY instead of INSPECT_INSPECT 2023-11-28 16:40:41 -08:00
Brendan Hansknecht
6eedd08e5a
add Debug to FlatInspectable 2023-11-28 16:40:41 -08:00
Brendan Hansknecht
796c2b1ded
unwrap builtin opaques like NUM_NUM 2023-11-28 16:40:41 -08:00
Brendan Hansknecht
f2ab6b54f3
correct Inspect.opaque and Inspect.function to be function calls 2023-11-28 16:40:41 -08:00
Brendan Hansknecht
35078a2295
allow nat in DeriveInspect 2023-11-28 16:40:41 -08:00
Brendan Hansknecht
a1a563074d
expand ui tests to numbers 2023-11-28 16:40:41 -08:00
Brendan Hansknecht
2e486953be
put inspect tests in their own module 2023-11-28 16:40:40 -08:00
Brendan Hansknecht
3434d3154a
Ayaz's fix and first passing inspect test 2023-11-28 16:40:40 -08:00
Brendan Hansknecht
f0dee1f6e9
add missing ToInspector case 2023-11-28 16:40:40 -08:00
Brendan Hansknecht
c57bc4db11
add uitest to view bool inspect derive 2023-11-28 16:40:40 -08:00
Brendan Hansknecht
96b3cc300f
encode/encoder to inspect/inspector 2023-11-28 16:40:40 -08:00
Brendan Hansknecht
b8e644a1e3
add DbgFormatter to inspect 2023-11-28 16:40:40 -08:00
Richard Feldman
768b55b8c5
Add some Inspect.inspect tests, fix a bug 2023-11-28 16:40:40 -08:00
Richard Feldman
443f6593c5
Add Inspect.Inspect to subs and auto-derive 2023-11-28 16:40:40 -08:00
Ayaz Hafiz
d36eba98fc
Add a few more opaque tests
`specialize/inspect/opaque_derived` does not yet pass.
2023-11-28 16:40:39 -08:00
Ayaz Hafiz
5c805ce80f
Get first inspect for non-Inspect-implementing opaques specialized 2023-11-28 16:40:39 -08:00
Ayaz Hafiz
c87e3e7413
TODO 2023-11-28 16:40:39 -08:00
Richard Feldman
34148645ae
wip 2023-11-28 16:40:39 -08:00
Richard Feldman
00c27b087b
Add Inspect to builtin_module_with_unlisted_ability_impl 2023-11-28 16:40:39 -08:00
Richard Feldman
d0841fb018
Add derive key for Inspect 2023-11-28 16:40:39 -08:00
Richard Feldman
fb9e0fc777
Add Inspect to obligation checker 2023-11-28 16:40:39 -08:00
Richard Feldman
5a872a1bdd
Add Nat to Inspect ability 2023-11-28 16:40:39 -08:00
Folkert
4fafc669b8
in record fields give a forced imported thunk a unique symbol 2023-11-28 23:47:53 +01:00
Anton-4
10897abd78
Merge pull request #6105 from caryoscelus/app-provides-error-reporting
Report lacking `to` while parsing app header
2023-11-28 12:35:42 +01:00
Anton-4
ba1a1e9243
minor wording change
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2023-11-28 11:42:52 +01:00
Anton-4
73597778b9
minor wording change
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2023-11-28 11:41:54 +01:00
Folkert de Vries
b2a459e0be
Merge pull request #6093 from roc-lang/switch-callee-register
Switch callee register
2023-11-28 11:12:51 +01:00
Brian Carroll
6a35d4b519
Merge pull request #6108 from roc-lang/list-map-argument-swap
fix dropping the wrong argument for List.map when it captures
2023-11-28 07:26:31 +00:00
caryoscelus
2fc8e88cca
Report lacking platform name in app header 2023-11-28 05:52:43 +00:00
John Murray
a5180bed67
make zig roc_panic return type be noreturn and remove some unreachable calls 2023-11-28 00:01:19 -05:00
caryoscelus
3332503f1d
Test reporting lack of to in app header 2023-11-28 02:18:50 +00:00
caryoscelus
d141237a17
Report lacking to while parsing app header 2023-11-28 02:18:24 +00:00
John Murray
2a762f1379
revert change of integer => Integer in panic messages 2023-11-27 19:59:30 -05:00
Folkert
32221a2e99
fix dropping the wrong argument for List.map when it captures 2023-11-27 23:02:44 +01:00
Ching Pei Yang
aad1c0682c
Add progress reporting even when total size is unknown 2023-11-27 18:11:41 +01:00
Elias Mulhall
0ccc71389a
move pattern desugar tests to test_mono 2023-11-26 20:26:43 -05:00
Elias Mulhall
d924125e6d
remove unnecessary comment 2023-11-26 20:26:42 -05:00
Elias Mulhall
439ce1143c
desugar patterns during canonicalization
Traverse pattern ASTs and desugar two cases

- Desugar optional record field default value expr. This expr might
  contain nodes that need to be desugared, such as binary operations.
  Failing to desugar this expr can cause an internal panic later in
  canonicalization.

- Discard SpaceBefore and SpaceAfter nodes so that patterns can be
  destructured over multiple lines. Keeping these nodes can cause an
  internal panic later in canonicalization. Fixes [1].

[1]: https://github.com/roc-lang/roc/issues/5653.
2023-11-26 20:26:42 -05:00
Elias Mulhall
0a48962abe
replace unreachable! with internal_error! in expr canonicalization
See https://github.com/roc-lang/roc/issues/2046
2023-11-26 20:26:34 -05:00
Ching Pei Yang
7f82f8da2b
Remove unused variable 2023-11-26 15:15:24 +01:00
Ching Pei Yang
b55336f093
Add simple download progress tracker 2023-11-26 15:15:23 +01:00
Becker A
714404b081
Fixed roc format --stdin --stdout to format output
fixes #6088 

Signed-off-by: Becker A. <awqatty.b@gmail.com>
2023-11-26 01:14:46 -07:00
George Ungureanu Vranceanu
23b6b432c7
Add log function to Dec 2023-11-25 21:03:26 +00:00
Folkert
104c44a754
ensure that when a switch case uses a callee-saved register, that register gets stored/restored properly 2023-11-25 20:18:37 +01:00
Folkert
85afcdd011
add clarifying comment to callee_saved 2023-11-25 19:54:51 +01:00
Jakub
7b08bf9486
Add CSS border to module functions in docs nav
Make side nav in docs more readable

Signed-off-by: Jakub <nawias@gmail.com>
2023-11-25 15:49:47 +01:00
John Murray
38207cff8a
fix typo 2023-11-24 10:07:27 -05:00
John Murray
925cba48e1
update docs for wasm repl dev 2023-11-24 10:07:27 -05:00
John Murray
14478c888d
remove bad copy paste 2023-11-24 10:07:26 -05:00
John Murray
abc92ded95
add test for divCeil by 0 2023-11-24 10:07:26 -05:00
John Murray
863ecd8da5
be excited to panic... 2023-11-24 10:07:26 -05:00
John Murray
5df2199ef5
add test for dec division 2023-11-24 10:07:26 -05:00
John Murray
23e22693d4
switch @panic to roc_panic to really throw panics for bad numeric ops 2023-11-24 10:07:26 -05:00
Luke Boswell
255847d2fe
cargo fmt 2023-11-24 09:57:06 +11:00
Luke Boswell
57f7a79a52
change @ token an UpperIdent 2023-11-24 08:33:02 +11:00
Richard Feldman
5e911f14d8
Merge pull request #6057 from lsculv/record-field-error-typo
Fix typo 'I trying' -> 'I am trying'
2023-11-22 09:12:30 -05:00
Anton-4
d72621ac03
Merge pull request #5983 from HajagosNorbert/get-pointer
mono::ir::Expr::UnionFieldPtrAtIndex -> GetElementPointer
2023-11-22 14:59:37 +01:00
Norbert Hajagos
70a10e45c1
Merge branch 'main' into get-pointer 2023-11-22 08:30:38 +01:00
Lucas Culverhouse
3c05690997
Fix typo 'I trying' -> 'I am trying' 2023-11-21 17:33:57 -08:00
jecaro
57f55dbe7e
Fix typo 2023-11-21 19:47:27 +01:00
jecaro
55befee0b0
Dont swallow bad input while parsing spaces
Fix #5939
2023-11-21 19:47:17 +01:00
Brendan Hansknecht
08ee6ed018
Merge pull request #6030 from roc-lang/pattern-match-rest-as
Pattern match rest as
2023-11-21 08:06:32 -08:00