Commit graph

1253 commits

Author SHA1 Message Date
Richard Feldman
5dafad506e
Merge pull request #4240 from roc-lang/list-growth
List growth
2022-10-08 23:58:49 -07:00
Richard Feldman
8b3d73dfbc
Merge pull request #4249 from snprajwal/list-walkBckwardsUntil
builtin(list): implement List.walkBackwardsUntil
2022-10-08 23:47:29 -07:00
Ayaz
8184262c08
Merge pull request #4247 from roc-lang/list-doc-fixes
Corrections for List docs
2022-10-08 14:31:56 -05:00
Ayaz
9d05bcd9d8
Merge pull request #4237 from snprajwal/str-withcapacity
builtin(str): implement Str.withCapacity
2022-10-08 14:31:30 -05:00
Anton-4
54fb1bc32f
Merge remote-tracking branch 'upstream/main' into str-withprefix 2022-10-08 19:58:51 +02:00
Brendan Hansknecht
aca6f2a8f1
add todo around improving performance 2022-10-08 07:53:50 -07:00
Brendan Hansknecht
8269986113
remove comment on zero width types.
They should not affect the normal case. It is better they affect the capacity calculation
2022-10-08 07:53:33 -07:00
dependabot[bot]
654a51335a
Bump dunce from 1.0.2 to 1.0.3
Bumps [dunce](https://gitlab.com/kornelski/dunce) from 1.0.2 to 1.0.3.
- [Release notes](https://gitlab.com/kornelski/dunce/tags)
- [Commits](https://gitlab.com/kornelski/dunce/commits/v1.0.3)

---
updated-dependencies:
- dependency-name: dunce
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-08 14:50:13 +00: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
Brian Carroll
4bebe7e236
Corrections for List docs 2022-10-08 08:40:29 +01:00
Prajwal S N
d6526fa425
builtin(str): add withPrefix
Closes #4142

Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2022-10-08 12:52:10 +05:30
Brendan Hansknecht
eca4682787
deal with zero element_width
That being said, this only affects wasm.
So wasm probably should be handling zero element lists in a smarter way.
2022-10-07 17:58:48 -07:00
Brendan Hansknecht
557ee69557
fix minor typo 2022-10-07 17:11:46 -07:00
Brendan Hansknecht
1665f7160d
Fix bug in reallocate 2022-10-07 17:11:33 -07:00
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
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