Brian Carroll
90449f45f3
test_gen: get some tests working with roc_wasm_interp
2022-12-10 00:52:23 +00:00
Ayaz Hafiz
e36618b9e9
Support custom abilities for opaques with immaterial lambda sets
...
If a specialization of an ability member has a lambda set that is not
reflected in the unspecialized lambda sets of the member's prototype
signature, then the specialization lambda set is deemed to be immaterial
to the specialization lambda set mapping, and we don't need to associate
it with a particular region from the prototype signature.
This can happen when an opaque contains functions that are some specific
than the generalized prototype signature; for example, when we are
defining a custom impl for an opaque with functions.
Addresses a bug found in 8c3158c3e0
2022-11-21 18:03:56 -06:00
Ayaz Hafiz
152400dea3
Add gen test for multiple ability bounds
2022-10-24 14:00:45 -05:00
Ayaz Hafiz
1d885c4ab2
Support deriving Decode for opaques
2022-10-23 20:48:06 -05:00
Ayaz Hafiz
c4f9aa6fe6
Add deriving toEncoder for opaques
2022-10-23 20:47:42 -05:00
Ayaz Hafiz
83813afeaf
Derive Eq for opaques
2022-10-23 20:46:56 -05:00
Ayaz Hafiz
40e05d5a00
Add support for deriving Hash for opaques
2022-10-23 20:46:56 -05:00
Ayaz Hafiz
f826ff1a71
Remove addI* variants from Hash
...
These are trivially fulfilled by converting a signed int to its unsigned
repr and hashing that.
2022-10-19 14:24:21 -05:00
Ayaz Hafiz
a256947a9f
Move Eq to Bool
2022-10-12 16:37:51 -05:00
Ayaz Hafiz
3674f6861e
Compile derived structural equality
2022-10-12 16:37:49 -05:00
Ayaz Hafiz
8310230f78
Add gen test for custom Eq
2022-10-12 16:37:49 -05:00
Ayaz Hafiz
cb96a64259
Implement hashing tag discriminants in derivers, rather than using low-level
...
This makes it so we can decide the discriminant in the front-end. With
this, we can also now revert the `LowLevel::TagDiscriminant`
introductions.
2022-10-05 12:58:04 -05:00
Ayaz Hafiz
a308ebb38c
Optimize derived hash implementation for newtypes
...
When we have a newtype tag union, there is no reason to hash its
discriminant.
2022-10-05 12:19:35 -05:00
Ayaz Hafiz
2517695ce4
Fix deriving of hash ability for recursive tag unions
2022-10-05 12:01:02 -05:00
Ayaz
02b02901bc
Update crates/compiler/test_gen/src/gen_abilities.rs
...
Signed-off-by: Ayaz <20735482+ayazhafiz@users.noreply.github.com>
2022-10-04 18:58:30 -05:00
Ayaz Hafiz
725054b8f3
Add TODO recursive tag union hashing test
2022-10-04 18:17:35 -05:00
Ayaz Hafiz
5389cdd87f
Add gen test for newtype, byte union, unit tag union hash deriving
2022-10-04 18:11:41 -05:00
Ayaz Hafiz
00ca8f2f80
Add gen test for deriving hash for heterogenous tags
2022-10-04 17:28:35 -05:00
Ayaz Hafiz
5870de54ae
Add gen tests for record hash deriving
2022-10-04 15:29:20 -05:00
Ayaz Hafiz
fd421c005d
Refactor hash immediate tests
2022-10-04 14:40:53 -05:00
Ayaz Hafiz
6d7f664194
Add test for hashing list of lists
2022-10-04 14:40:21 -05:00
Ayaz Hafiz
c2c15d3ee1
Skip pending test on wasm
2022-10-04 14:39:55 -05:00
Ayaz Hafiz
42ddcb70df
Add derive test for List of strings
2022-10-04 14:09:40 -05:00
Ayaz Hafiz
5b833e57b5
Support derivation of Hash for Str and List
2022-10-04 14:09:40 -05:00
Ayaz Hafiz
715d88510c
Add tests for immediates of the Hash ability
2022-10-04 14:09:40 -05:00
Ayaz Hafiz
1c8ed27e58
Avoid Hash shadowing in abilities tests
2022-10-04 10:23:09 -05:00
Ayaz Hafiz
877714e9c0
Unused imports in gen-abilities
2022-09-30 14:24:06 -05:00
Ayaz Hafiz
06bef34829
Import Decode by default in all modules
2022-09-21 12:29:07 -05:00
Ayaz Hafiz
f10c47ec20
Update gen_abilities tests
2022-09-21 12:29:06 -05:00
Folkert de Vries
acb71d6007
Merge pull request #3835 from roc-lang/ext-vars-in-derivers
...
Support bound and unbound extension variables in deriving
2022-08-30 00:34:50 +02:00
Ayaz Hafiz
1c6d423e52
Add comment for why we're ignoring deep specialization tests
2022-08-25 09:41:57 -05:00
Ayaz Hafiz
356ba91f19
Ignore tests that stack overflow on debug builds
2022-08-25 09:22:53 -05:00
Ayaz Hafiz
a8bd529664
Support derivers for tag unions with ext vars
2022-08-23 10:41:06 -05:00
Folkert de Vries
9f772d4ca2
Merge pull request #3826 from roc-lang/flex-ability-adhoc
...
Allow inferred flex vars inside type constructors bound to an ability
2022-08-23 09:21:55 +02:00
Ayaz Hafiz
0ddbc172d7
Add destructured inferred example
2022-08-22 17:06:23 -05:00
Ayaz Hafiz
142428a0bc
Add let-generalization example for decoding
2022-08-22 17:05:57 -05:00
Ayaz Hafiz
6417e75bda
Add gen example of inferred decoder
2022-08-22 17:05:57 -05:00
Folkert
e9f66a6385
Merge remote-tracking branch 'origin/main' into i3696
2022-08-22 23:02:35 +02:00
Folkert de Vries
2b0bf7839e
Merge pull request #3819 from roc-lang/deep-record-decoding
...
Mono fixes for supporting deep record decoding deriving
2022-08-21 13:33:40 +02:00
Ayaz Hafiz
81235b98d6
Turn on ability tests that work
2022-08-19 22:21:33 -05:00
Ayaz Hafiz
2f9f96b946
Turn on gen test that works again
2022-08-19 22:20:57 -05:00
Ayaz Hafiz
106f725c45
Ignore test on llvm wasm3
2022-08-19 22:18:45 -05:00
Ayaz Hafiz
abdc0d5689
Add an example for deeply nested record decoding
2022-08-16 08:11:14 -05:00
Ayaz Hafiz
bed9b57b58
Add ignored empty record decoding test
2022-08-15 11:11:37 -05:00
Ayaz Hafiz
21c3d0cafa
Add test for string and int record decoding
2022-08-15 11:11:37 -05:00
Ayaz Hafiz
60ed17155c
Check in gen test for record decoding!
2022-08-15 11:11:36 -05:00
Ayaz Hafiz
d01c5c83b7
Check in gen tests that don't work yet
2022-08-15 11:11:33 -05:00
Folkert de Vries
f2a6310137
Merge pull request #3735 from roc-lang/turn-on-abilities-wasm-tests
...
Turn abilities tests for wasm dev and wasm LLVM back on
2022-08-14 16:18:48 +02:00
Richard Feldman
97e2900bf5
s/rtfeldman/roc-lang/g in links to GitHub repos
2022-08-12 15:24:09 -04:00
Ayaz Hafiz
9f206e89f4
Turn on LLVM wasm tests for gen_abilities
...
Closes #3708
2022-08-09 09:06:04 -07:00