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
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
Richard Feldman
3991bd31d6
Don't qualify iterateBackwards
2022-07-25 19:15:36 +02:00
Richard Feldman
038e999009
roc format List.roc
2022-07-25 19:15:35 +02:00
Richard Feldman
6a3694cf8f
Fix some errors and warnings
2022-07-25 19:15:35 +02:00
Richard Feldman
bae99413dd
Expose List.startsWith and List.endsWith
2022-07-25 19:15:34 +02:00
Richard Feldman
a5384effee
Improve some doc comments
2022-07-25 19:15:33 +02:00
Richard Feldman
c87f2fdee1
Add List.splitFirst and List.splitLast
2022-07-25 19:15:33 +02:00
Richard Feldman
87f03d1f9f
Add List.findLast and findLastIndex
2022-07-25 19:15:32 +02:00
Richard Feldman
46abf539bf
Drop unnecessary parens
2022-07-25 19:15:32 +02:00
Richard Feldman
f3b8025d8d
Rename List.find and findIndex to include 'First'
2022-07-25 19:15:32 +02:00
Richard Feldman
661376958c
Add List.startsWith and List.endsWith
2022-07-25 19:15:31 +02:00
Folkert
012c6a75d1
simplify RocStr to array in zig
2022-07-24 11:50:28 +02:00
Folkert
ab3a431db7
add string cloning helper
2022-07-23 00:08:01 +02:00
Ayaz Hafiz
3a57af8731
Format Json.roc
2022-07-19 14:30:20 -04:00
Ayaz Hafiz
f3105eca6e
Format Json.roc
2022-07-18 22:14:39 -04:00
Ayaz Hafiz
d2da395619
Syntactic ability links in solve
2022-07-18 18:33:28 -04:00
Ayaz
d5f36a6780
Merge pull request #3568 from rtfeldman/list-maptry
2022-07-18 15:22:38 -05:00
Richard Feldman
7e446d1b0d
Eliminate @memcpy from Str.trim functions
2022-07-18 10:28:53 -04:00
Richard Feldman
fd65f12cad
Merge pull request #3567 from rtfeldman/result-try
...
Rename `Result.after` to `Result.try`, `Result.afterErr` to `Result.onErr`
2022-07-17 22:47:02 -04:00
Ayaz
d354dd177a
Merge pull request #3564 from rtfeldman/fix-json
...
JSON doesn't allow trailing commas
2022-07-17 21:43:01 -05:00
Richard Feldman
b92a2b8dad
Clarify docs a bit
2022-07-17 21:54:36 -04:00
Richard Feldman
08ead32be9
Add List.mapTry
2022-07-17 21:53:01 -04:00
Richard Feldman
145bd8b4a2
Rename Result.afterErr to Result.onErr
2022-07-17 21:37:32 -04:00
Richard Feldman
0acab0eef3
Rename Result.after to Result.try
2022-07-17 17:25:50 -04:00
Richard Feldman
518b21c3f8
Rename Json.format to Json.toUtf8
2022-07-17 15:21:27 -04:00
Richard Feldman
4af506c530
JSON doesn't allow trailing commas
2022-07-17 15:18:52 -04:00