rvcas
b7d48b2fe1
feat: add the rest of the num types for Str conversion
2021-12-06 23:24:02 -05:00
rvcas
bc5b1abcba
feat(Str.toNum): support decimal
2021-12-02 15:35:34 -05:00
Folkert
d6ed2147ae
basic working test case
2021-12-02 20:30:58 +01:00
rvcas
8a21b42c20
feat: check errorcode in returned record for a value greater than 0
2021-12-02 14:06:29 -05:00
rvcas
0d74daf7d9
feat: match on a Union Layout and use index access to get the num layout
2021-12-01 16:25:24 -05:00
Anton-4
e63701c5d1
trying to make Str.toNum work for Ints
2021-12-01 20:37:21 +01:00
Folkert
69fc1ad7e7
sketch of StrToNum
2021-12-01 15:33:16 +01:00
Richard Feldman
e6bec46898
Merge pull request #2109 from rtfeldman/refactor-passed-function
...
refactor passed (to higher order lowlevel) funcion
2021-12-01 08:17:39 -05:00
Brian Carroll
a3827d6636
Merge pull request #2071 from rtfeldman/refcount-mono-ir
...
Start generating refcounting code as mono IR
2021-12-01 12:59:16 +00:00
Folkert
bec74c36c5
refactor passed (to higher order lowlevel) funcion
2021-11-30 21:50:27 +01:00
rvcas
f995a07029
feat: Num.toStr
...
* add type for Num.toStr
* create new lowlevel
* delete types and Symbol for fromInt and fromFloat
* leave LowLevel::{StrFromFloat,StrFromInt}
* match on LowLevel::NumToStr and figure out the layout to decide
which build function to delegate to
2021-11-30 14:52:06 -05:00
Brian Carroll
6e5acadfea
Create new lowlevels for refcounting
2021-11-30 09:57:00 +00:00
Folkert
0bdda2506c
add update mode to reset and reuse
2021-11-28 14:13:02 +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
7d231f87cd
remove usize llvm gen
2021-11-21 13:24:53 +01:00
Folkert
123c963ff1
llvm build working
2021-11-21 00:23:59 +01:00
Folkert
c4ec9aa898
working mono
2021-11-20 23:25:30 +01:00
Folkert de Vries
25a64f4a57
Merge pull request #2032 from rtfeldman/joshuawarner32/internal-linkage
...
Use Internal linkage to keep roc function symbols in the final binary
2021-11-20 12:30:41 +01:00
Joshua Warner
45f9f800ef
Use Internal linkage instead of Private to keep roc function symbols in the final binary
2021-11-19 21:32:34 -08:00
Michael Downey
df91f63af8
changing const_zero to const_int
2021-11-19 07:24:07 -05:00
Michael Downey
51ad326d11
fmt
2021-11-16 17:30:04 -05:00
Michael Downey
d946b84e63
adding initial List.all
2021-11-16 16:34:36 -05:00
Richard Feldman
28273b67da
Merge pull request #1970 from rtfeldman/shrink-call-type
...
Shrink call type
2021-11-15 19:56:21 -08: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
Folkert
fcb89cbcd8
Merge remote-tracking branch 'origin/trunk' into shrink-call-type
2021-11-13 19:31:30 +01:00
Folkert
f8b4ce0317
shrink tag id sizes in layouts
2021-11-13 19:31:20 +01:00
Theo Felippe
ea5aac7b74
Merge branch 'trunk' into builtins-str-trim-right
2021-11-13 18:05:40 +00:00
Theo Felippe
8d7c252fce
implemented Str.trimRight
2021-11-13 18:02:58 +00:00
Richard Feldman
0b2df3154c
Merge remote-tracking branch 'origin/trunk' into shrink-call-type
2021-11-13 08:21:13 -08: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
Folkert
f522d28a00
clippy
2021-11-13 16:04:23 +01:00
Folkert
83953b0bba
shrink Call
2021-11-13 15:59:19 +01:00
Folkert
e2f7606f25
shrink higher order with indirection
2021-11-13 15:42:47 +01: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
38da99b1ac
make it work
2021-11-11 23:36:35 +01:00
Folkert
c827256e47
Merge remote-tracking branch 'origin/trunk' into tag-union-imitate-rust
2021-11-11 18:58:49 +01:00
Folkert
5d7b4b7ad0
change roc call result; adding an extra field for the error message pointer
...
When the returned value was smaller than a pointer, there was no space for the error message pointer.
2021-11-10 22:14:54 +01:00
Folkert
144dbef434
Merge remote-tracking branch 'origin/trunk' into tag-union-imitate-rust
2021-11-10 17:19:30 +01:00
Michael Downey
07cd3850d7
Merge branch 'trunk' into str_trim_left
2021-11-09 19:43:26 -05:00
Michael Downey
c1a48c0a9a
fixing line for cargo fmt
2021-11-09 15:11:36 -05:00
Michael Downey
1f74fd6856
fixing formatting and adding str_trim_left back to solve_expr
2021-11-09 14:57:35 -05:00
Michael Downey
7e074d300e
cleaning up and adding comments
2021-11-09 14:37:31 -05: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