Commit graph

306 commits

Author SHA1 Message Date
Folkert
94efbd0e95 Merge remote-tracking branch 'origin/trunk' into builtins-list-take-last 2021-11-09 16:18:19 +01:00
satotake
dfc527ecff Merge branch 'trunk' into builtins-list-take-last 2021-11-09 12:34:58 +00:00
satotake
772fc9c021 Implement List.takeLast 2021-11-09 12:26:17 +00:00
Folkert
960733c605 Merge remote-tracking branch 'origin/trunk' into builtin/List.find 2021-11-09 13:07:47 +01:00
Folkert
af8ee4b7bb add cargo aliases for convenient test running 2021-11-09 12:27:28 +01:00
Brendan Hansknecht
1028e1593a Fix unused import 2021-11-08 19:49:33 -08:00
Brendan Hansknecht
360974398a Merge test_dev, test_wasm, and test_wasm_util into test_gen 2021-11-08 19:31:20 -08: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
9087bf7273 Merge branch 'trunk' into builtsins-list-take-first 2021-11-08 14:32:36 +00:00
satotake
878400f95f Implement List.takeFirst 2021-11-08 14:10:53 +00:00
satotake
97c82d8d51 pick 02acef6 2021-11-08 11:15:20 +00:00
satotake
b8340b47c6 checkout trunk 2021-11-08 11:13:17 +00:00
satotake
c8f7a98d74 Merge branch 'trunk' into remove-dict-hash-test-only 2021-11-08 11:12:31 +00:00
Brendan Hansknecht
2ce945771e Make test crates only have dev dependencies and separate out wasm memory helper 2021-11-07 18:01:40 -08:00
Brendan Hansknecht
89781ec50d Stop building test crates as part of non-test builds 2021-11-07 16:28:17 -08:00
Brian Carroll
ce9658684a Move wasmer dependency from gen_wasm to test_wasm 2021-11-07 22:56:28 +00:00
Kevin Sjöberg
dfe3f045bd Ignore broken test case for now 2021-11-07 20:48:09 +01:00
Kevin Sjöberg
5e1a9832cb Return false in case of empty list 2021-11-07 20:47:09 +01:00
Kevin Sjöberg
44938a9e35 Implement List.any 2021-11-07 20:44:10 +01:00
ayazhafiz
0d2ed76334 Implement List.joinMap
Closes #1887
2021-11-07 11:08:20 -05:00
satotake
0b524889c0 fmt 2021-11-07 12:46:11 +00:00
satotake
ad50f4a8f3
Merge branch 'trunk' into remove-dict-hash-test-only 2021-11-07 21:43:04 +09:00
satotake
a12b75192e Hide Dict.hashTestOnly 2021-11-07 12:30:04 +00:00
satotake
0922c86352 Rollback 2021-11-07 12:27:26 +00:00
Brendan Hansknecht
74a55f53f3 Switch back to cranelift due to versioning and aarch64 issues 2021-11-06 14:24:58 -07:00
Brendan Hansknecht
40f0271ccf Fix M1 mac build
I changed wasmer to use the llvm backend because it compiles the fastest and supports aarch64.
If we later run into llvm versioning issues of some sort, we should switch this to cranelift.
Also re-adds serde-json which is used on macos.
2021-11-06 14:08:19 -07:00
Brendan Hansknecht
73e2cbcb1e Make versions numbers consistent and matching the lock files 2021-11-06 13:24:45 -07:00
Anton-4
69f6ffadab
Merge branch 'trunk' into deps 2021-11-06 18:07:34 +01:00
Kevin Sjöberg
f6d055dc62 Correct minor spelling mistakes 2021-11-06 15:29:08 +01:00
Richard Feldman
3df3e2f0d5
Merge branch 'trunk' into deps 2021-11-06 07:19:02 -04:00
Chelsea Troy
208bce563a
Merge branch 'trunk' into dropfirst-builtin 2021-11-05 23:34:46 -05:00
Brendan Hansknecht
c595668b37 Remove dependency on cranelift 2021-11-05 19:59:42 -07:00
Brendan Hansknecht
d49ac68bcc Update dep with major version changes 2021-11-05 19:19:37 -07:00
Brendan Hansknecht
bddc08c977 Remove unused dependencies 2021-11-05 16:58:11 -07:00
Eric Newbury
f3a350dd74 add dropFirst builtin 2021-11-05 16:12:29 -04:00
Folkert
aa9bf6bdff fix alignment problem 2021-11-03 18:21:07 +01:00
satotake
02acef68df remove Dict.hashTestOnly 2021-11-03 14:33:53 +00:00
Anton-4
a3fc724df3 removed unused maplit 2021-11-03 10:50:25 +01:00
Richard Feldman
0bc3ff4ca5 Use std and core over libc where equivalent 2021-11-02 19:37:05 -04:00
Richard Feldman
ffbf2b4276 Move some things to dev deps 2021-11-02 19:37:05 -04:00
Kevin Sjöberg
f9ed060e49 Implement List.map4 2021-10-31 21:08:41 +01:00
Chelsea Troy
4afaf96aea
Add List.max builtin 2021-10-30 19:17:35 -05:00
Folkert de Vries
aa978ae6d9
Merge branch 'trunk' into list_min 2021-10-28 20:32:27 +02:00
Tim Whiting
c721a1cc1f add builtin List.min 2021-10-27 20:28:34 -06:00
Folkert de Vries
29bd4e3e50
Merge branch 'trunk' into str_trim 2021-10-26 22:45:32 +02:00
Dan Knutson
12d35ba9f1 work around all test strings being static 2021-10-25 20:22:37 -05:00
Dan Knutson
e1b9699272 remove TODO tags 2021-10-25 20:22:37 -05:00
Dan Knutson
ca48d17dbc add Roc-level shared case tests 2021-10-25 20:22:37 -05:00
Dan Knutson
6f7a26895a handle small strings correctly 2021-10-25 20:22:37 -05:00
Dan Knutson
13fd72f3d8 thrashing 2021-10-25 20:22:37 -05:00