Richard Feldman
9b05d8dd50
Move expect
zig code out of utils
2022-02-02 19:15:47 -05:00
Richard Feldman
a55ff62e6c
Merge remote-tracking branch 'origin/trunk' into expect-dont-panic
2022-01-30 20:22:26 -05:00
Folkert
7e38309364
make alignment target-specific
2022-01-26 17:24:52 +01:00
Folkert
fbd26c598e
provide target info to number alignment function
2022-01-26 17:19:53 +01:00
Jan Van Bruggen
9a8a4c6ed7
Add Num.(min/max)(I/U)(8/16)
builtins
2022-01-22 00:19:17 -07:00
Eric Newbury
a96d5e6abf
Merge branch 'trunk' into enewbury/list-sort-desc
2022-01-21 17:06:52 -05:00
Eric Newbury
7e7104d9ba
WIP
2022-01-21 16:46:47 -05:00
Eric Newbury
05c01a81f5
adding List.sortAsc builtin
2022-01-21 15:34:24 -05:00
Jan Van Bruggen
8e4b6f0cab
Remove Num.(min/max)Int
...
Replace all uses with `Num.(min/max)I64`,
since all uses expect an `I64`.
2022-01-19 09:55:06 -07:00
Jan Van Bruggen
591477e77b
Add most remaining Num.min/max*
builtins
...
This skips `min/maxU128`, as they require a subtle change
to the `I128`-centric implementation of `Int`s.
2022-01-17 15:26:23 -07:00
Chelsea Troy
085c02ffee
Infrastructure to test and implement the replacement of an 'expect' failure with an error production
...
Last command run was 'cargo test expect_fail'
2022-01-16 22:01:22 -06:00
Jan Van Bruggen
d7e2be306f
WIP: Add Num.minI128
builtin (TODOs remain)
2022-01-15 17:49:15 -07:00
ayazhafiz
2c41c43aea
Implement saturated add/subtract
2022-01-10 22:37:08 -05:00
ayazhafiz
abe42781d5
Use unsigned LLVM intrinsic arithmetic for unsigned integers
...
Closes #2331
2022-01-10 19:20:51 -05:00
rvcas
c4e6349714
fix(bitcode): leave a comment explaining why u64 is not used
2021-12-28 13:07:05 -05:00
rvcas
715c441b25
fix(int_instrinsic): these should be unsigned
2021-12-27 19:07:52 -05:00
ayazhafiz
ed64ff912a
Implement List.dropIf
...
This was referenced in the `List` documentation and in the
[tutorial](./TUTORIAL.md), but wasn't actually implemented prior to this
commit!
Part of #2227
2021-12-22 12:34:48 -06:00
Richard Feldman
1ce648ac27
Merge pull request #2116 from rtfeldman/str_to_num
...
Str.toNum
2021-12-09 09:48:38 -05:00
rvcas
b7d48b2fe1
feat: add the rest of the num types for Str conversion
2021-12-06 23:24:02 -05:00
rvcas
e587e20de2
feat: switch to using a builtin per num type to convert from a string
2021-12-06 22:24:00 -05:00
rvcas
bc5b1abcba
feat(Str.toNum): support decimal
2021-12-02 15:35:34 -05:00
rvcas
ba9d01773b
fix: result holds a num_type
2021-12-01 16:25:00 -05:00
rvcas
3104406956
feat: add the type def for Str.toNum
2021-12-01 16:12:55 -05:00
Anton-4
e63701c5d1
trying to make Str.toNum work for Ints
2021-12-01 20:37:21 +01:00
Anton-4
2e21fd0cb9
Merge branch 'str-to-num' of github.com:rtfeldman/roc into str_to_num
2021-12-01 19:43:01 +01:00
Folkert
69fc1ad7e7
sketch of StrToNum
2021-12-01 15:33:16 +01:00
Anton-4
eaf4e57759
started on Str.toNum
2021-12-01 15:15:30 +01: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
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
7fc79c3d40
fix typo
2021-11-21 19:20:05 +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
Michael Downey
d11bb93539
Merge branch 'trunk' into add_list_all
2021-11-18 16:09:24 -05:00
Michael Downey
9d587d37b4
Merge branch 'trunk' into add_list_all
2021-11-18 06:41:08 -05:00
satotake
ce8a88416d
Merge branch 'trunk' into builtins-list-intersperse
2021-11-18 11:16:27 +00: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
satotake
16fb04b4fa
Add builtin List.intersperse
2021-11-17 15:18:45 +00: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
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
Theo Felippe
8d7c252fce
implemented Str.trimRight
2021-11-13 18:02:58 +00:00
Folkert de Vries
c9b15766be
Merge branch 'trunk' into builtins-refactor-list-take
2021-11-13 13:29:57 +01:00
Theo Felippe
10eab4b785
implemented Result.isErr
2021-11-13 08:29:40 +00:00
satotake
9ec2bc7946
Remove takeFirst
and takeLast
from backend
2021-11-13 06:03:18 +00:00
satotake
98d2c57edf
move List.sublist to backend
2021-11-13 04:57:28 +00:00
satotake
8f8b2463ea
reset
2021-11-13 03:38:58 +00:00
satotake
4359dcff73
Merge branch 'trunk' into builtins-refactor-list-take
2021-11-13 03:38:29 +00:00
satotake
d63849c5a3
Add List.takeFisrt2, List.takeLast2 for demo
2021-11-12 13:47:28 +00:00