Commit graph

106 commits

Author SHA1 Message Date
Anton-4
f085b96f78
removed unused deps, added CI test 2024-04-09 19:47:31 +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
Richard Feldman
12aa775f54
Update mono tests 2024-02-17 13:20:34 -05:00
Richard Feldman
418731cb71
Update mono tests 2024-01-26 16:25:32 -05:00
Richard Feldman
c4497f2c1c
Remove Nat from Num 2024-01-26 16:19:51 -05:00
Richard Feldman
0a4862da88
Update mono tests 2024-01-26 16:04:16 -05:00
Richard Feldman
f2bd5efa41
update mono tests 2024-01-17 22:16:10 -05:00
Brendan Hansknecht
0e842fd844
update formatting, uitest, and mono_test 2023-12-11 18:22:53 -08:00
Brendan Hansknecht
156a462f1d
update uitest and mono_test 2023-12-10 11:24:22 -08:00
Brendan Hansknecht
d202b77ae1
update uitest and mono_test 2023-12-09 18:11:22 -08:00
Brendan Hansknecht
37656f4cc0
update uitest and mono_test 2023-12-05 12:45:31 -08:00
LoipesMas
a9196a9abb Add more generated files 2023-12-05 00:18:32 +01:00
Brendan Hansknecht
e1c850e2d1
update uitest and mono_test 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
be17c0cadb
load world abilities sooner 2023-12-02 21:18:32 -08:00
Brendan Hansknecht
4587c4ebc5
update uitest and mono_test 2023-12-02 21:18:31 -08: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
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
83bf3cbd3a
update tests 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
a1a563074d
expand ui tests to numbers 2023-11-28 16:40:41 -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
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
Isaac Van Doren
139d3c6f89
make dropFirst and dropLast drop n elements 2023-10-29 13:23:33 -05:00
Folkert
60afb79cc7
simplify regex expression strings 2023-10-07 19:11:37 +02:00
Richard Feldman
15a6bc34f4
Merge remote-tracking branch 'origin/main' into inspect-builtin 2023-08-14 15:03:27 -04:00
Richard Feldman
f68272944c
Update uitest 2023-08-11 06:34:17 -04:00
Richard Feldman
7908645895
Fix more tests 2023-08-10 22:24:24 -04:00
Richard Feldman
2da41be29f
Merge remote-tracking branch 'origin/main' into abilities-syntax 2023-08-10 20:36:01 -04:00
Ayaz Hafiz
dac4d842d8
Fix types 2023-07-17 09:52:14 -05:00
Ayaz Hafiz
a2574a5a98
Update vars 2023-07-12 17:01:31 -05:00
Ayaz Hafiz
937e042c8f
Fixed erased with nullable unwrapped union 2023-07-12 16:01:44 -05:00
Ayaz Hafiz
5e9a06e537
Boxed helpers 2023-07-12 15:55:25 -05:00
Ayaz Hafiz
8d9c6d09b9
Load as a stack pointer 2023-07-12 14:46:11 -05:00
Ayaz Hafiz
fde75d5432
Correct calling branches 2023-07-12 14:45:03 -05:00
Ayaz Hafiz
fcb907b0c9
Don't pass empty captures 2023-07-12 14:45:02 -05:00
Ayaz Hafiz
cd64134b0a
Allow direct packing, unpacking of erased types 2023-07-12 14:43:25 -05:00
Ayaz Hafiz
dc56a0ffef
First pass update erasure IR 2023-07-12 14:43:24 -05:00
Ayaz Hafiz
b2d3b52bd5
First compile of erased lambdas 2023-07-12 14:21:28 -05:00
Ayaz Hafiz
a9e3f967a8
First pass at erased function layouts 2023-07-12 13:57:19 -05:00
Ayaz Hafiz
6e5a308557
Content variant ErasedLambda 2023-07-12 13:57:17 -05:00
Ayaz Hafiz
c459757062
Thread simple model of "ErasedLambdas" through proc layouts
But none of these paths are yet exercised.
2023-07-12 13:53:52 -05:00
Ayaz Hafiz
6eae480e36
Check in first erasure test 2023-07-12 13:53:52 -05:00
Ayaz Hafiz
6014370b91
Initial support for erasure in tests 2023-07-12 13:53:51 -05:00
Ayaz Hafiz
44c4797d9a
Parameterize program solving on a FunctionKind
This new flag determines whether we should introduce a new kind to
represent lambda sets, or whether lambdas should be erased. The latter
is not yet implemented.
2023-07-12 13:53:50 -05:00
Folkert
ef39bad7c6
auto clippy fixes 2023-07-10 18:27:08 +02:00