Ayaz Hafiz
619cd2f629
Infer ranged number for chars in patterns
2022-10-05 17:28:01 -05:00
Ayaz Hafiz
178b634266
Treat single quote literals as ranged numbers for inference purposes
2022-10-05 17:28:00 -05:00
Ayaz Hafiz
a842247aa6
Unused import
2022-10-05 13:09:10 -05:00
Ayaz Hafiz
792afe5457
Remove TagDiscriminant low-level
2022-10-05 13:00:45 -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
41c9985c53
Support newtypes and unit tag union hash deriving
2022-10-04 18:11:37 -05:00
Ayaz Hafiz
ff70832068
Derive hash for tag unions with a discriminant
2022-10-04 17:19:30 -05:00
Ayaz Hafiz
5eb00c4f94
Generate derive keys for tags
2022-10-04 16:23:24 -05:00
Ayaz Hafiz
46f111c6dd
Add hash deriving for records
2022-10-04 15:23:41 -05:00
Ayaz Hafiz
ad4d98be9c
Add derive key generation for record hashing
2022-10-04 14:42:00 -05:00
Ayaz Hafiz
5b833e57b5
Support derivation of Hash for Str and List
2022-10-04 14:09:40 -05:00
Ayaz Hafiz
427528e659
Add deriving of immediates for the Hash ability
2022-10-04 14:09:39 -05:00
Anton-4
f6324edc10
Merge branch 'main' of github.com:roc-lang/roc into rust-1-62-1
2022-09-10 18:17:33 +02: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
a01583efff
Add derive key tests for able ext vars
2022-08-23 10:41:06 -05:00
Ayaz Hafiz
2f24c81dab
Support deriving decoder for record with arbitrary ext var
2022-08-23 10:41:06 -05:00
Ayaz Hafiz
b5e59d22e3
Support extension variables in record and tag union encoding derive keys
2022-08-23 10:41:06 -05:00
Folkert
a22e04361c
Merge remote-tracking branch 'origin/main' into expect-fx-codegen
2022-08-23 16:28:21 +02:00
Anton-4
6df2632157
minor cleanup
2022-08-22 15:33:18 +02:00
Anton-4
9aee7cdcf6
1.62.1 version update, fmt, clippy
2022-08-22 15:27:19 +02:00
Ayaz Hafiz
51faeaf9af
Fix doc comment
2022-08-15 11:11:37 -05:00
Ayaz Hafiz
3770db5d70
Add test for underivable optional record
2022-08-15 11:11:37 -05:00
Ayaz Hafiz
68441479b8
Add decoding record derive key tests
2022-08-15 11:11:37 -05:00
Ayaz Hafiz
0f58328d3d
Use wrap_in_decode_custom_decode_with for decode record
2022-08-15 11:11:36 -05:00
Ayaz Hafiz
44a746b473
Update derive decoder test
2022-08-15 11:11:36 -05:00
Ayaz Hafiz
f95c5aee12
Check in derived record impl
2022-08-15 11:11:33 -05:00
Ayaz Hafiz
66f75b86ee
Fix ROC_PRINT_UNIFICATIONS_DERIVED
2022-08-15 11:11:33 -05:00
Ayaz Hafiz
c81eecd644
Print back records without trailing comma
2022-08-15 11:11:31 -05:00
Ayaz Hafiz
0fd467ca01
Print back record updates
2022-08-15 11:11:31 -05:00
Ayaz Hafiz
e1359c3025
Print back tags appropriately
2022-08-15 11:11:31 -05:00
Richard Feldman
bff2852639
Add an initial record decoding test
2022-08-15 11:11:31 -05:00
Folkert
ed055a0bd8
fix compile error in test
2022-08-13 19:05:45 +02:00
Ayaz Hafiz
de3a12167b
Wrap list decoders in Decode.custom for now
...
Otherwise we get some weird panics in borrow, I think something is going
wrong with let-generalization
2022-08-03 16:09:22 -05:00
Ayaz Hafiz
8a0dedc975
Allow unused mut variable
2022-08-03 16:08:36 -05:00
Ayaz Hafiz
ab3ff6e842
Add a list decoder
2022-08-03 14:57:38 -05:00
Ayaz Hafiz
429ebbc830
Have v! macro specify what it needs itself
2022-08-03 14:57:16 -05:00
Ayaz Hafiz
e2179348c6
Add derive keys for decoders
2022-08-03 08:56:25 -05:00
Ayaz
d0890e0694
Merge pull request #3677 from rtfeldman/refactor-derive-tests
...
Refactor deriving tests to put testing utilities in separate module
2022-08-02 21:04:03 -05:00
Ayaz Hafiz
3ec68fb3ef
Update type variables in derive tests
2022-08-02 16:16:12 -05:00
Ayaz Hafiz
9877224678
Turn on deriver tests that work again
...
Blocked on #3643
2022-08-02 16:15:35 -05:00
Ayaz Hafiz
05d8bca0fb
Move DeriveBuiltin to derive_key
2022-08-02 14:29:49 -05:00
Ayaz Hafiz
6f06a59cdf
Condition derive tests on derived method
2022-08-02 14:28:20 -05:00
Ayaz Hafiz
c3383da994
Refactor deriving tests to put testing utilities in separate module
...
As we prepare to add derivers for Decoders, we'll want to use this same
infrastructure for Decoder derive tests. This pulls out the common test
infrastructure into a separate module under test_derive.
2022-08-02 14:28:20 -05:00
Ayaz
6b6f240acb
Merge pull request #3589 from rtfeldman/can-abilities3
...
Canonicalize syntactic abilities: Part 3 - solving
2022-07-25 21:48:14 -05:00
Ayaz Hafiz
0525c6d616
Import both specializations and declared ability mappings
2022-07-25 10:06:49 -04:00
Ayaz Hafiz
cd0b8577ab
Have load_internal deal with separate declared/known ability specializations
2022-07-25 09:24:58 -04:00
Ayaz Hafiz
4031770836
Mark branch patterns degenerate when they don't bind symbols body needs
2022-07-22 17:26:45 -04:00
Ayaz Hafiz
e3742481f4
Improve pretty printing of derived impls
2022-07-16 12:31:06 -04:00
Ayaz Hafiz
c647973dee
Wrap list encoders in Encode.custom for now
2022-07-16 12:30:15 -04:00