Commit graph

76 commits

Author SHA1 Message Date
Folkert
61aeaefc76
a start with 32-bit linux support 2022-03-30 23:55:34 +02:00
Brian Carroll
456d8ff9cb Merge branch 'trunk' of github.com:rtfeldman/roc into list-str-capacity 2022-03-11 19:28:13 +00:00
Folkert
de6349fbbd
don't double-alloca non-recursive tags 2022-03-09 22:54:56 +01:00
Folkert
07063a8e18
Merge remote-tracking branch 'origin/trunk' into list-str-capacity 2022-03-09 14:36:34 +01:00
Brendan Hansknecht
2ca1ebdd2d appease the paperclip 2022-02-27 15:50:19 -08:00
Brendan Hansknecht
2e70bb8458 remove list set low level 2022-02-27 15:07:09 -08:00
Brendan Hansknecht
116b585cdc add more tests 2022-02-24 22:59:47 -08:00
Brendan Hansknecht
badad1c1ad get basic tests passing 2022-02-24 22:50:28 -08:00
Brendan Hansknecht
889b189191 fix list passing 2022-02-24 22:46:50 -08:00
Brendan Hansknecht
aff962809b call ListReplace and generate struct afterwards 2022-02-24 22:33:36 -08:00
Brendan Hansknecht
dddf8ff785 switch from pair to record and change name to ListReplaceUnsafe 2022-02-24 20:41:26 -08:00
Brendan Hansknecht
27b47713aa Add some comments and TODOs 2022-02-24 20:40:45 -08:00
Brendan Hansknecht
ba2e8cd32b Add base piping for list.Replace 2022-02-24 17:58:56 -08:00
Folkert
3e413764e2
make llvm gen tests work 2022-02-20 14:25:26 +01:00
Folkert
177529bfb6
all string tests passing 2022-02-20 13:04:12 +01:00
Folkert
5582644166
use str/list helpers to prepare for adding capacity 2022-02-18 22:23:05 +01:00
Richard Feldman
71f2444397
s/Int/Nat in a comment 2022-02-11 21:26:39 -05:00
Jan Van Bruggen
f47dbb5171
Swap List.mapWithIndex arg1 args order to put the element first 2022-02-11 16:10:29 -07:00
Jan Van Bruggen
92e0f8714f
Swap List.repeat args order to put the list first 2022-02-11 16:10:29 -07:00
Folkert
74932a4cab phase 2 2022-01-26 14:30:37 +01:00
Folkert
727f2f6e93 cleanup 2021-12-08 21:02:38 +01:00
Folkert
6c5f809678 cleanup 2021-12-08 21:00:53 +01:00
Folkert
79d5c82dfb cleanup 2021-11-27 16:36:43 +01:00
Folkert
a1fd34feef remove empty layout types (list,str,dict,set) 2021-11-27 14:05:16 +01:00
Folkert
dc44eaac97 cleanup 2021-11-21 14:11:18 +01:00
Folkert
123c963ff1 llvm build working 2021-11-21 00:23:59 +01:00
Michael Downey
d946b84e63 adding initial List.all 2021-11-16 16:34:36 -05:00
satotake
c253273490 Merge branch 'trunk' into refactor-builtin-list-drop 2021-11-15 11:37:32 +00:00
satotake
8e29daa160 remove low-level List.drop codes 2021-11-15 11:28:38 +00:00
Richard Feldman
1c6fab7043
Merge pull request #1916 from rtfeldman/tag-union-imitate-rust
Tag union imitate rust
2021-11-13 08:13:32 -08: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
196538cc58 fix valgrind error, finally 2021-11-13 01:00:20 +01:00
Folkert
144dbef434 Merge remote-tracking branch 'origin/trunk' into tag-union-imitate-rust 2021-11-10 17:19:30 +01: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
Folkert
a9d483cb60 Merge remote-tracking branch 'origin/trunk' into tag-union-imitate-rust 2021-11-08 22:31:17 +01: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
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
Folkert
3138fc43ec cosmetic changes 2021-11-07 16:31:43 +01:00
Folkert
180575852a all tests passing 2021-11-07 14:56:24 +01:00
Richard Feldman
4e19320982
Merge branch 'trunk' into false-cleanup 2021-11-01 22:30:45 -04:00
Kevin Sjöberg
f9ed060e49 Implement List.map4 2021-10-31 21:08:41 +01:00
Folkert
29e7853b85 use phi node in elem_loop 2021-10-30 22:05:43 +02:00
Folkert
dd38d49335 fix formatting 2021-10-20 19:44:26 +02:00
Folkert
9fc832d8ef new intrinsic approach 2021-10-20 15:18:02 +02:00