Ayaz Hafiz
f458da0cbc
Implement Hash for Bool
2023-03-28 15:04:45 -05:00
Ayaz
61dd5cc8c7
Merge pull request #5179 from roc-lang/i5143-tuple-abilities
...
Implement ability obligation checking and derivation for tuples
2023-03-25 15:51:39 -05:00
Ayaz Hafiz
e6094df69b
Fast-path for determining ability member impls for builtin opaques
2023-03-22 17:08:41 -05:00
Ayaz Hafiz
1b087df287
Add gen tests for decoding tuples
2023-03-22 16:56:22 -05:00
Ayaz Hafiz
c7bd430026
Gen tests for derived tuple encoding
2023-03-22 11:40:55 -05:00
Ayaz Hafiz
72c9b76f23
Gen Eq test for tuple
2023-03-22 10:55:15 -05:00
Ayaz Hafiz
143f39d273
Gen tests for derivation of tuple hash
2023-03-22 10:53:14 -05:00
Ayaz Hafiz
240c1f35d6
Ranged number abilities are derived and compiled correctly
...
Closes #5089
2023-03-22 09:42:06 -05:00
Ayaz Hafiz
7a4fed932d
Add gen tests for concerete unspecialized set conservation
2023-02-20 18:59:48 -06:00
Ayaz Hafiz
9a4e4f25c2
Add regression tests for #4772
...
Closes #4772
2023-01-18 18:11:57 -06:00
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