Commit graph

1712 commits

Author SHA1 Message Date
Anton-4
a44f692563
Merge remote-tracking branch 'upstream/main' into list-walkBckwardsUntil 2022-10-08 19:55:47 +02:00
Jan Van Bruggen
8ada13cc3b
Merge pull request #4015 from roc-lang/simplify_examples
Drastically simplify examples directory
2022-10-08 03:46:12 -06:00
Prajwal S N
cbceeff902
builtin(list): implement List.walkBackwardsUntil
Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2022-10-08 14:23:06 +05:30
Ayaz
fae90c9fd2
Merge pull request #4187 from roc-lang/ranged-char-literal
Single-quote literals behave like ranged numbers
2022-10-07 15:05:09 -05:00
Ayaz
7752ecc895
Merge pull request #4224 from roc-lang/is-zero-lowlevel
Implement Num.isZero as a low-level
2022-10-07 15:03:55 -05:00
Ayaz
addfa29a56
Merge pull request #4227 from snprajwal/list-expose-walktry
builtin(list): expose walkTry
2022-10-07 09:45:21 -05:00
Anton-4
c6ec3d5d30
Merge branch 'main' of github.com:roc-lang/roc into simplify_examples 2022-10-07 16:00:32 +02:00
Ayaz
f0786121fb
Merge pull request #4222 from roc-lang/explicit-imports-in-prelude
List dependencies in the stdlib explicitly rather than hard-coding
2022-10-07 02:39:54 -05:00
Ayaz
2cf1309326
Update crates/compiler/builtins/roc/List.roc
Signed-off-by: Ayaz <20735482+ayazhafiz@users.noreply.github.com>
2022-10-06 16:19:15 -05:00
Prajwal S N
0f96dddc25
builtin(list): expose walkTry
Fixes: #4168

Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2022-10-07 00:03:18 +05:30
Ayaz
a5a984ca45
Merge pull request #4217 from roc-lang/hashing-perf
Misc hashing perf
2022-10-05 20:00:46 -05:00
Ayaz Hafiz
d9207137e8
Implement Num.isZero as a low-level
This will be needed ahead of the `Eq` ability.

Closes #4223
2022-10-05 19:47:29 -05:00
Ayaz Hafiz
5416eb7cbf
List dependencies in the stdlib explicitly rather than hard-coding 2022-10-05 18:53:49 -05:00
Ayaz
0b57b00235
Merge pull request #4205 from roc-lang/more-hash-derivers
Support deriving `Hash` for inductive records
2022-10-05 17:30:02 -05:00
Ayaz Hafiz
262d13ffe7
Simplify char pattern matching in json parser 2022-10-05 17:28:02 -05:00
Ayaz Hafiz
7064d1c060
Gen test for char pattern matching 2022-10-05 17:28:01 -05:00
Ayaz Hafiz
912cebc33d
Add tests for inferring char ranged number 2022-10-05 17:28:01 -05:00
Ayaz Hafiz
619cd2f629
Infer ranged number for chars in patterns 2022-10-05 17:28:01 -05:00
Ayaz Hafiz
9054266a76
Simplify Json.roc 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
4f1d7fca9a
Merge pull request #4218 from roc-lang/rollup-10-05
Misc bugfixes 10-05
2022-10-05 14:52:11 -05:00
Ayaz
596f14d173
Merge pull request #4203 from roc-lang/shift-signature
Have `Num.shift*By` functions shift by a `U8`
2022-10-05 13:26:36 -05:00
Ayaz Hafiz
f849bab6f1
Ignore large bit abs on wasm 2022-10-05 13:06:44 -05:00
Brendan Hansknecht
ca92b5e8e8
Increase the inline threshold 2022-10-05 08:11:10 -07:00
Brendan Hansknecht
4ebe1b2bce
Avoid allocating a new list when calling List.sublist 2022-10-05 08:11:02 -07:00
Ayaz Hafiz
657346a057
Support Num.abs for non-64 bit integer types
Closes #4210
2022-10-05 08:39:45 -05:00
Ayaz Hafiz
df3b7cb1b4
Preserve comments before header
Closes #4212
2022-10-05 08:34:30 -05:00
Ayaz Hafiz
7421485973
Remove clone 2022-10-04 15:37:03 -05:00
Ayaz Hafiz
5870de54ae
Add gen tests for record hash deriving 2022-10-04 15:29:20 -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
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
29991654db
Make sure conversion of signed ints before shift applies to the shifted number 2022-10-04 14:23:53 -05:00
Ayaz Hafiz
085c73dffe
Clippy 2022-10-04 14:10:29 -05:00
Ayaz Hafiz
f2c30a699c
Remove stray dbg 2022-10-04 14:09:40 -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
294244ae25
Make sure flex unifies with rigid-able vars correctly 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
8844cd256e
Make sure Num.minU128/Num.maxU128 is properly exposed 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
Ayaz
a08b45263b
Merge branch 'main' into shift-signature
Signed-off-by: Ayaz <20735482+ayazhafiz@users.noreply.github.com>
2022-10-04 12:58:09 -05:00
Ayaz Hafiz
dea7661068
Have Num.shift*By functions shift by a U8
302305020
2022-10-04 12:28:33 -05:00
Ayaz Hafiz
f68cb3b0ed
Flip order of hash signature 2022-10-04 12:14:07 -05:00
Ayaz Hafiz
e9efc95425
Obligation checking for the Hash ability
This implements type-level checks that types can and cannot implement
the `Hash` ability.

Part of #4195
2022-10-04 10:51:14 -05:00
Ayaz Hafiz
ca4ee908f8
Avoid shadowing Hash in mono tests 2022-10-04 10:23:39 -05:00
Ayaz Hafiz
1c8ed27e58
Avoid Hash shadowing in abilities tests 2022-10-04 10:23:09 -05:00
Ayaz Hafiz
eadbc0912a
Update the compiler to be aware of Hash 2022-10-04 10:22:22 -05:00