Brian Carroll
3c74acafa4
More precise alignCast (allow for 32-bit targets)
2021-12-16 11:45:54 +00:00
Folkert
7fc79c3d40
fix typo
2021-11-21 19:20:05 +01:00
Michael Downey
9d587d37b4
Merge branch 'trunk' into add_list_all
2021-11-18 06:41:08 -05:00
Michael Downey
c5484a9ad3
fixing List.all on empty list to be true
2021-11-17 22:47:49 -05:00
Richard Feldman
2bb007e08b
Merge pull request #1987 from rtfeldman/builtins-list-split
...
Add builtin `List.split`
2021-11-17 13:41:58 -05:00
Michael Downey
d946b84e63
adding initial List.all
2021-11-16 16:34:36 -05:00
satotake
73dda714de
Add builtin List.split
2021-11-15 13:50:11 +00:00
satotake
8e29daa160
remove low-level List.drop
codes
2021-11-15 11:28:38 +00:00
satotake
f587be5169
zig fmt
2021-11-13 06:06:24 +00:00
satotake
9ec2bc7946
Remove takeFirst
and takeLast
from backend
2021-11-13 06:03:18 +00:00
satotake
2e073d57ea
destruct record at high level
2021-11-13 05:13:46 +00:00
satotake
98d2c57edf
move List.sublist to backend
2021-11-13 04:57:28 +00:00
Folkert
94efbd0e95
Merge remote-tracking branch 'origin/trunk' into builtins-list-take-last
2021-11-09 16:18:19 +01:00
satotake
772fc9c021
Implement List.takeLast
2021-11-09 12:26:17 +00:00
ayazhafiz
f65b174ab5
Implement List.find
...
`List.find : List elem, (elem -> Bool) -> Result elem [ NotFound ]*`
behaves as follows:
```
>>> List.find [1, 2, 3] (\n -> n > 2)
Ok 2
>>> List.find [1, 2, 3] (\n -> n > 4)
Err NotFound
```
We implement this as builtin in two phases. First, we call out to a
pure-llvm-lowlevel `ListFindUnsafe` that returns a record indicating
whether a satisfying element was found, and the value of that element
(the value is all null bytes if the element wasn't found). Then, we lift
that record to a `Result` via a standard construction of the can AST.
Closes #1909
2021-11-08 21:03:14 -05:00
satotake
d0b09e1922
cleanup unused args
2021-11-08 14:31:34 +00:00
satotake
878400f95f
Implement List.takeFirst
2021-11-08 14:10:53 +00:00
Kevin Sjöberg
d6e98c08ec
Increment the counter if data is owned
2021-11-07 20:50:29 +01:00
Kevin Sjöberg
87894578cf
Remove alignment parameter
2021-11-07 20:48:09 +01:00
Kevin Sjöberg
44938a9e35
Implement List.any
2021-11-07 20:44:10 +01:00
Kevin Sjöberg
f9ed060e49
Implement List.map4
2021-10-31 21:08:41 +01:00
Folkert
94e8c62613
make things compile, base64 has a memory leak
2021-10-06 22:57:11 +02:00
Dan Knutson
25215cb3e3
cleanup mutable case, split test
2021-10-03 14:09:07 -05:00
Dan Knutson
2a72439117
WIP adding unique mutable case
2021-10-03 13:55:11 -05:00
Dan Knutson
65821d6a9f
remove giesch/todo tags, add List.drop doc
2021-10-03 13:55:11 -05:00
Dan Knutson
700ab20a8c
add tests for List.dropAt
2021-10-03 13:55:11 -05:00
Dan Knutson
3baff93a97
add first version of List.dropAt
...
* adds an implementation with no uniqueness/mutability
2021-10-03 13:55:11 -05:00
Folkert
0690633116
spec for List.reverse
2021-10-03 13:34:09 +02:00
Folkert
13d480d5f3
spec for list append
2021-10-03 13:27:47 +02:00
Folkert
486f1d540f
add specifications for fromUtf8 and toUtf8
2021-10-03 13:22:03 +02:00
Folkert
018348bd83
make Str.fromUtf8 in-place
2021-10-03 12:13:17 +02:00
Folkert
dbb8acbe67
add in-place List.swap
2021-10-03 00:25:35 +02:00
Folkert
225c97aae3
move List.prepend to zig
2021-08-14 12:28:05 +02:00
Folkert
59e551dd32
cleanup
2021-07-24 00:13:00 +02:00
rvcas
fb12715aba
chore: list remove unused vars
2021-07-02 18:36:17 -04:00
Folkert
98a9dc0945
remove tag id from data bytes for non-recursive tags
2021-06-26 17:01:23 +02:00
Folkert
fc4f04dbd8
clean up variable names
2021-06-24 21:21:07 +02:00
Folkert
8d9f5b078e
fix ffi
2021-06-24 21:11:25 +02:00
Folkert
f8bdf05f90
has_tag_id from zig
2021-06-24 20:12:05 +02:00
Folkert
27308e98b7
use morphic update mode
2021-06-22 20:53:55 +02:00
Folkert
12c186813d
use std.mem.swap
2021-06-09 14:25:45 +02:00
rvcas
573f7d8093
feat(listRange): use a more terse syntax
2021-06-06 00:53:25 -04:00
tarjei
45185d1e84
Implement List.swap in zig
2021-05-31 19:08:37 +02:00
tarjei
ade591dd10
Fix plumbing
2021-05-29 22:21:25 +02:00
Folkert
4d0216cf09
fix merge conflicts
2021-05-25 09:18:39 +02:00
Folkert de Vries
5724f82667
Merge branch 'trunk' into zig-list-set
2021-05-25 09:05:18 +02:00
Richard Feldman
aa96d2373b
Reorder args in decref
2021-05-24 22:06:35 -04:00
Richard Feldman
0b3715ebee
Rearrange arg order for roc_alloc etc
2021-05-24 21:01:12 -04:00
Richard Feldman
7d7588ca19
Merge remote-tracking branch 'origin/trunk' into roc_alloc
2021-05-24 20:10:26 -04:00
Folkert
799e4a3239
use new roc alloc stuff for List.set
2021-05-24 18:27:27 +02:00