Commit graph

488 commits

Author SHA1 Message Date
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
Prajwal S N
9013e4ce11
builtin(str): implement withCapacity
Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2022-10-08 00:24:46 +05:30
Brendan Hansknecht
d06966392f
Add smarter list capacity growth calculations 2022-10-07 08:59:32 -07:00
Ayaz
addfa29a56
Merge pull request #4227 from snprajwal/list-expose-walktry
builtin(list): expose walkTry
2022-10-07 09:45:21 -05: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 Hafiz
262d13ffe7
Simplify char pattern matching in json parser 2022-10-05 17:28:02 -05:00
Ayaz Hafiz
9054266a76
Simplify Json.roc 2022-10-05 17:28:01 -05:00
Folkert
b09c631895
cleanup 2022-10-05 23:59:29 +02:00
Folkert
8c4a2f58fc
working expects in roc dev 2022-10-05 22:17:40 +02: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
Brendan Hansknecht
4ebe1b2bce
Avoid allocating a new list when calling List.sublist 2022-10-05 08:11:02 -07:00
Ayaz Hafiz
5b833e57b5
Support derivation of Hash for Str and List 2022-10-04 14:09:40 -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
eadbc0912a
Update the compiler to be aware of Hash 2022-10-04 10:22:22 -05:00
Ayaz Hafiz
76510ec323
Add Hash.roc builtin module 2022-10-04 10:14:29 -05:00
Jan Van Bruggen
f6c981294a
Merge pull request #4126 from roc-lang/i4064
Str.splitFirst should not find match if needle is longer than haystack
2022-09-29 23:30:56 -06:00
Jan Van Bruggen
cd5747a15c
Run formatter even though it makes matchesAtHelp uglier
Signed-off-by: Jan Van Bruggen <JanCVanB@pm.me>
2022-09-29 23:28:34 -06:00
Jan Van Bruggen
5d814b3ea5
Refactor matchesAtHelp for clarity
Signed-off-by: Jan Van Bruggen <JanCVanB@pm.me>
2022-09-29 23:28:27 -06:00
Ayaz Hafiz
c9c2f61e3e
Add some docs to matchesAtHelp 2022-09-29 22:32:16 -05:00
Ayaz Hafiz
1d7dc65800
Str.splitFirst should not find match if needle is longer than haystack
Closes #4064
2022-09-28 13:14:36 -05:00
Folkert
9106479d07
access out of bounds in string split 2022-09-28 15:17:07 +02:00
Folkert
f44a30cf48
fix off-by-one error in List.dropAt 2022-09-28 14:57:55 +02:00
Ayaz
211c297230
Merge pull request #4041 from KilianVounckx/opaque-bool
Opaque bool
2022-09-21 11:15:41 -05:00
Folkert de Vries
a74f5d9366
Merge pull request #4076 from roc-lang/collapse-void-2
Unwrap layouts containing void layouts as newtypes
2022-09-21 00:13:56 +02:00
kilianv
49319a2ffe
Update Bool documentation to opaque types 2022-09-20 14:42:04 -05:00
kilianv
610c529ba8
Update roc files to use new opaque bools 2022-09-20 14:42:04 -05:00
kilianv
6dbebd7834
Update Bool to be opaque 2022-09-20 14:42:01 -05:00
Ayaz Hafiz
77fbc0189e
Eliminate unnecessary branch in List.roc 2022-09-20 08:43:08 -05:00
Jan Van Bruggen
063464cb12
Fix/update path
I don't know if this file moved, but this is where it is now.

Signed-off-by: Jan Van Bruggen <JanCVanB@users.noreply.github.com>
2022-09-15 23:29:33 -06:00
Richard Feldman
620a3feb75
Add some tests for Str.replace___ functions 2022-09-12 21:05:50 -06:00
Richard Feldman
4ed63c548b
Fix type mismatches in Str.replace___ functions
...and fix/finish the draft `Str.replaceEach` implementation!
Don't be so modest, Richard :)
2022-09-12 21:05:38 -06:00
Jan Van Bruggen
9ef57f86ac
Add first draft of Str.replaceEach builtin 2022-09-12 21:03:11 -06:00
Jan Van Bruggen
2b65659a11 Add Str.replaceLast builtin 2022-09-12 20:37:23 -06:00
Jan Van Bruggen
c5b6aef21a Add Str.replaceFirst builtin 2022-09-12 20:37:23 -06:00
Jan Van Bruggen
8bbfd68621
Add language to all fenced code blocks
See https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md040
2022-09-09 01:12:31 -06:00
Jan Van Bruggen
2cbfef490a
Fix space positioning typo 2022-09-09 01:12:31 -06:00
Jan Van Bruggen
072a6bd002
Eliminate consecutive newlines
See https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md012
2022-09-09 01:12:30 -06:00
Jan Van Bruggen
3219178003
Ensure only one h1 per .md file
See https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md025
2022-09-07 23:27:18 -06:00
Jan Van Bruggen
26a1abfea8
Add blank lines around lists
See https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md032
2022-09-07 23:18:03 -06:00
Jan Van Bruggen
e3071a22b0
Add blank lines around headings
See https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md022
2022-09-07 23:18:03 -06:00
Jan Van Bruggen
6229eb54ca
Add blank lines around fenced code blocks
See https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md031
2022-09-07 23:18:03 -06:00
Folkert de Vries
33ae4c2655
Merge branch 'main' into windows-surgical-dll
Signed-off-by: Folkert de Vries <folkert@folkertdev.nl>
2022-09-05 11:31:19 +02:00
Brian Carroll
517223e12a
Merge pull request #3962 from roc-lang/capacity-realloc
Use capacity better for realloc
2022-09-04 17:00:37 +01:00