Commit graph

977 commits

Author SHA1 Message Date
Richard Feldman
2970fc4384
Merge remote-tracking branch 'origin/main' into str-unicode 2024-01-21 12:30:16 -05:00
Folkert
351c9215fe
dev backend: f32 abs 2024-01-19 15:16:32 +01:00
Richard Feldman
b48fa0698a
Remove scalars and graphemes from Str 2024-01-17 21:30:34 -05:00
Brian Teague
60c639b60e
Consolidate gitignore
Keep certain files with no file extension

Keep specific files with no file extension

Delete all gitignore files
2024-01-10 22:16:04 -05:00
Folkert
7a365eb88f
enable even more dev-backend num tests 2024-01-02 22:23:47 +01:00
Folkert
b7a41bcb3e
enable many more dev-backend num tests 2024-01-02 21:30:49 +01:00
Folkert
6c521555ea
decimal division in dev backend 2024-01-02 19:53:13 +01:00
Folkert
4bcd195b92
implement NumSub (that panics) in the dev backend 2024-01-02 19:47:17 +01:00
Folkert
cfdfbe18a4
implement panic on overflow for mul in the dev backend 2024-01-02 15:56:28 +01:00
Anton-4
5f1c383aa0
fmt 2024-01-01 17:11:46 +01:00
Anton-4
1126f85b5a
fix clippy unnecessary hashes 2024-01-01 16:38:36 +01:00
Bryce Miller
12d1d7386b
modify test to sidestep wasm gen bug 2023-12-18 11:24:11 -05:00
Bryce Miller
99e596c4a0
don't run test for gen_wasm 2023-12-12 20:54:27 -05:00
Bryce Miller
59eb28ef58
Add builtin List.walkWithIndexUntil 2023-12-11 23:04:40 -05:00
Brendan Hansknecht
c87dcd1205
correct wrong test case 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
37656f4cc0
update uitest and mono_test 2023-12-05 12:45:31 -08:00
Brendan Hansknecht
3f50f78eba
update tests and Dict.keepShared semantics 2023-12-05 12:37:12 -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
Brendan Hansknecht
749faf4850
a few missed variable renames 2023-12-04 14:57:47 -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
496cd6710a
fix debug info and add it all to the llvm backend 2023-12-04 12:55:33 -08:00
Brendan Hansknecht
e5a0af5699
make DbgFormatter an unexposed implementation detail 2023-12-03 12:41:04 -08:00
Ayaz
20bcd70ad2
Merge branch 'main' into div-0-should-crash 2023-12-02 20:10:32 -06: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
Brendan Hansknecht
3e66254b25
update zig and rust platforms to have correct roc_panic and roc_dbg 2023-11-29 21:49:34 -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
ead90313d8
Merge pull request #5775 from roc-lang/inspect-derive
Derive Inspect
2023-11-29 08:22:27 -08:00
John Murray
298f93d20c
update a bunch of panic message to be capitalized 2023-11-28 20:46:09 -05: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
2e486953be
put inspect tests in their own module 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
Folkert
4fafc669b8
in record fields give a forced imported thunk a unique symbol 2023-11-28 23:47:53 +01:00
John Murray
2a762f1379
revert change of integer => Integer in panic messages 2023-11-27 19:59:30 -05:00
John Murray
38207cff8a
fix typo 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
5df2199ef5
add test for dec division 2023-11-24 10:07:26 -05:00
Brendan Hansknecht
ee10af2c68
add currently broken test case for list .. as rest 2023-11-20 21:09:11 -08:00
Brian Carroll
5719384ed9
Get rid of VM stack storage 2023-11-05 23:20:46 +00:00
Isaac Van Doren
139d3c6f89
make dropFirst and dropLast drop n elements 2023-10-29 13:23:33 -05:00
Brian Carroll
c50925240d
Merge pull request #5921 from roc-lang/wasm-repl-crash
report roc_panic to the user in the web repl
2023-10-25 19:22:10 +01:00
Brendan Hansknecht
0f5b112336
disable list_range_length_overflow for dev wasm 2023-10-23 13:50:36 -07:00
Anton-4
845da6a5c9
clippy 2023-10-23 13:50:35 -07:00
Anton-4
7da37c0e98
rustfmt 2023-10-23 13:50:35 -07:00
Brian Carroll
6e2d7e4a8d
Improve Wasm debug instructions 2023-10-23 13:50:35 -07:00