Commit Graph

200 Commits

Author SHA1 Message Date
Ayaz Hafiz
b4e7ae0654
Make sure to part decimal part of a float after decimal point 2022-08-03 10:13:39 -05:00
Anton-4
6697e353a1
Merge pull request #3674 from rtfeldman/decode-obligation-checking
Obligation checking for derivability of Decode
2022-08-03 14:19:20 +02:00
Folkert de Vries
b4880ae66f
Merge pull request #3689 from rtfeldman/fix/3685-Str.splitLast
Fix Str.splitLast for needle positioned last
2022-08-03 13:27:25 +02:00
Anton-4
2b08347e66
cap retries on flaky error 2022-08-03 11:30:47 +02:00
Mostly Void
d6a54710d6
Fix Str.splitLast
This fixes the behavior of the function when the needle is positioned
last in the haystack.

» Str.splitLast "ehllo,," ",,"

Ok { after: "", before: "ehllo" } : Result { after : Str, before : Str } [NotFound]*
2022-08-03 11:30:49 +05:30
Anton-4
ced2b2cda9
auto-retry flaky zig on FileNotFound 2022-08-02 14:31:17 -05:00
Ayaz
fa14146054
Merge pull request #3531 from rtfeldman/decode
Very basic Decode.roc in the standard library
2022-08-02 14:26:28 -05:00
Brendan Hansknecht
ca8b052094
switch to wrapping subtract since it is safe here 2022-08-01 22:32:43 -07:00
Brendan Hansknecht
afaf59a050
change refcounts to assume overflows are impossible 2022-08-01 22:32:43 -07:00
Ayaz Hafiz
5ba646d3e0
Remove decodeElems and handle end-of-list appropriately 2022-08-01 11:07:27 -05:00
Ayaz Hafiz
ffb7f7a001
Naive decoding of lists 2022-08-01 10:12:45 -05:00
Ayaz Hafiz
03463a2a5e
Naive string decoding 2022-08-01 09:56:59 -05:00
Anton-4
0b5b3a8652
Merge branch 'trunk' of github.com:rtfeldman/roc into build-nix 2022-08-01 16:51:07 +02:00
Anton-4
43f9e2a7c3
fixes to make default.nix work 2022-08-01 16:50:38 +02:00
Ayaz Hafiz
d1880cae76
Add a comment 2022-08-01 09:50:18 -05:00
Ayaz Hafiz
e1c8b3c9b0
Format Json.roc 2022-08-01 09:48:38 -05:00
Ayaz Hafiz
c85c865b05
Bool decoding 2022-08-01 09:47:42 -05:00
Ayaz Hafiz
a00953128d
Use asciiByte helper 2022-08-01 09:47:35 -05:00
Ayaz Hafiz
e00ebbead7
Properly parse floats 2022-08-01 09:32:05 -05:00
Ayaz Hafiz
f06ed1a647
Add FIXME comments 2022-08-01 09:08:19 -05:00
Ayaz Hafiz
6a4a3e2c60
Expose Json.fromUtf8 2022-08-01 08:09:23 -05:00
Ayaz Hafiz
10ce5d0615
Implement Json fromBytes without let-generalization 2022-08-01 08:09:23 -05:00
Ayaz Hafiz
3fdde9e8f0
Stub out a decoder implementation for Json 2022-08-01 08:09:23 -05:00
Ayaz Hafiz
623f5698ac
Qualify Encode.custom 2022-08-01 08:09:23 -05:00
Ayaz Hafiz
df3ee468c6
Remove unneeded imports 2022-08-01 08:09:23 -05:00
Ayaz Hafiz
b602c1fa2f
Qualify JSON encode names 2022-08-01 08:09:23 -05:00
Ayaz Hafiz
41af6d96a8
Remove unnecessary comment from Json module 2022-08-01 08:09:23 -05:00
Ayaz Hafiz
fc71e3df04
Add Decode to the load graph 2022-08-01 08:09:22 -05:00
Ayaz Hafiz
de1588e760
Add the Decode module 2022-08-01 08:09:22 -05:00
Richard Feldman
fffbbd08b0
Merge pull request #3656 from rtfeldman/expect-struct
Expect struct/box/non-recursive tag
2022-08-01 08:51:19 -04:00
Richard Feldman
a05a482ff9
Drop unused fs-extra dependency 2022-07-29 17:16:51 -04:00
Richard Feldman
1071aa8eac
Don't copy zig-cache when building builtins 2022-07-29 17:16:51 -04:00
Folkert
1bfac155ca
implement expect struct reporting 2022-07-28 16:47:02 +02:00
Folkert de Vries
66365fba6e
Merge pull request #3649 from rtfeldman/3640-str-split-edge-case
Fix `Str.split` edge case when string and delimiter are equal
2022-07-28 11:30:40 +02:00
Folkert de Vries
21fe0ca559
Merge pull request #3639 from rtfeldman/expect-lists
Tests for expect output
2022-07-28 08:53:58 +02:00
raleng
c7997c7c38
Fix formatting 2022-07-28 01:57:01 +02:00
raleng
17fc1a297c
Fix Str.split when string equals delimiter
countSegments and strSplitHelp check whether the length of the string is
strictly greater-than the length of the delimiter, skipping most of the
logic when this is not the case.

Changing the check to a greater-than-or-equal allows for the case when
the string and the delimiter are equal, giving the expected result of
["", ""].
2022-07-28 01:36:02 +02:00
raleng
71e83746cc
add countSegments test case
The test ensures countSegments returns a count of two when the string
and the delimiter are equal. The expected result of Str.split in that
case is ["", ""].
2022-07-28 01:35:08 +02:00
raleng
261ff3224d
Add strSplitHelp test cases
Add a test for the case when the string starts with the delimiter, and
when the string and the delimiter are equal.
2022-07-28 01:34:20 +02:00
Folkert
8e5b0daa94
figured out how to serialize nested structures 2022-07-27 23:52:11 +02:00
Folkert
e62a0ee39a
make string clone return where next extra bytes should be written 2022-07-27 22:48:41 +02:00
Folkert
f7452b8889
pass the shared buffer to zig directly 2022-07-27 17:16:12 +02:00
Folkert
498004c554
clean up expect code when not running tests 2022-07-27 12:26:03 +02:00
Folkert
40d7e94a17
make the mmapped buffer configurable 2022-07-26 23:36:25 +02:00
Folkert
6d0e751999
fix bug in expect handling on the cli side 2022-07-25 22:37:36 +02:00
Richard Feldman
4a371b9524
roc format List.roc 2022-07-25 19:15:39 +02:00
Richard Feldman
f216224495
Fix off-by-one in List.splitFirst and splitLast 2022-07-25 19:15:38 +02:00
Richard Feldman
6f1932eae4
Fix endsWith off-by-one error 2022-07-25 19:15:38 +02:00
Richard Feldman
d60ad6b5af
Fix iterateBackwards 2022-07-25 19:15:36 +02:00
Richard Feldman
1c2047fbeb
Rename an argument 2022-07-25 19:15:36 +02:00