Theo Felippe
10eab4b785
implemented Result.isErr
2021-11-13 08:29:40 +00:00
Theo Felippe
84af26d813
added placeholder implementation
2021-11-11 19:13:42 +00:00
Folkert de Vries
b3a663a741
Merge branch 'trunk' into builtins-list-sublist
2021-11-10 16:28:58 +01:00
satotake
9f5d3f521b
Implement List.sublist
2021-11-10 13:16:57 +00:00
Folkert de Vries
eb1b6d97bf
Merge branch 'trunk' into str_trim_left
2021-11-10 14:06:01 +01:00
Folkert
b8ba387863
update comment
2021-11-10 02:31:59 +01:00
Michael Downey
07cd3850d7
Merge branch 'trunk' into str_trim_left
2021-11-09 19:43:26 -05:00
Michael Downey
151c92bb48
adding tests and changing trimLeft to pass long unique test
2021-11-09 18:16:32 -05:00
Folkert
a9ce02799c
WIP
2021-11-09 21:37:56 +01:00
Michael Downey
9d1038cd9b
zig fmt'd str.zig
2021-11-09 14:51:07 -05:00
Michael Downey
e845f48247
fixed tests
2021-11-09 14:47:32 -05:00
Michael Downey
7e074d300e
cleaning up and adding comments
2021-11-09 14:37:31 -05:00
Folkert
a9d561089a
enable function-sections so unused builtins are dropped from the executable (during the linking step)
2021-11-09 20:32:27 +01:00
Michael Downey
1bc278d962
initial commit of Str.trimLeft
2021-11-09 14:25:24 -05: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
9087bf7273
Merge branch 'trunk' into builtsins-list-take-first
2021-11-08 14:32:36 +00: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
satotake
97c82d8d51
pick 02acef6
2021-11-08 11:15:20 +00:00
Richard Feldman
79080fb3f2
Merge pull request #1907 from rtfeldman/cleanup-zig-artifact-gen
...
generate wasm32 object file containing the builtins
2021-11-07 23:43:47 +00:00
Richard Feldman
0a347456ef
Merge pull request #1903 from rtfeldman/fix-str-from-int
...
Implement Str.fromInt for any integer type
2021-11-07 23:42:59 +00:00
Brian Carroll
3ce94f8939
Merge branch 'trunk' into cleanup-zig-artifact-gen
2021-11-07 20:19:15 +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
0e500ba33c
Document List.any
2021-11-07 20:43:28 +01:00
ayazhafiz
0d2ed76334
Implement List.joinMap
...
Closes #1887
2021-11-07 11:08:20 -05:00
Folkert de Vries
c0c2c1341c
Merge branch 'trunk' into fix-str-from-int
2021-11-07 00:00:21 +01:00
Folkert
75c090fd24
cleanup
2021-11-06 23:57:21 +01:00
Folkert
a31279a2c6
generate wasm32 object file
2021-11-06 23:03:46 +01: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
Kevin Sjöberg
491a480371
Implement Str.fromInt for any integer type
2021-11-06 14:55:27 +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
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
Anton-4
a3fc724df3
removed unused maplit
2021-11-03 10:50:25 +01:00
Folkert
7cd5d41b35
bump varid for closure var (List.map4 used so many variables that they interfered
2021-11-01 10:34:34 +01: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
Dan Gieschen Knutson
02117ba512
Merge branch 'trunk' into str_trim
2021-10-27 18:01:29 -05:00
Dan Knutson
bf29639d87
deinit a string that has been trimmed to nothing
2021-10-27 17:58:30 -05:00
Locria Cyber
791c46fe0d
Remove deprecated zig features
2021-10-26 20:21:55 -04:00
Folkert de Vries
29bd4e3e50
Merge branch 'trunk' into str_trim
2021-10-26 22:45:32 +02:00
Chelsea Troy
7680a1d17a
Remove unused code
2021-10-25 21:55:45 -05:00