Folkert de Vries
1a3f2aed4f
Merge branch 'trunk' into refactor-builtin-list-drop
2021-11-15 19:51:17 +01:00
satotake
73dda714de
Add builtin List.split
2021-11-15 13:50:11 +00:00
Brian Carroll
46636ef331
Ensure lowlevel inlining does not skip bounds checks
2021-11-15 12:56:34 +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
Brian Carroll
e200e6c346
Clippy + fmt
2021-11-15 09:52:16 +00:00
Brian Carroll
79bd9ccf71
Symbol-to-lowlevel mapping for both dev backends
2021-11-15 00:27:04 +00:00
Brian Carroll
00793eb0d8
Fix inexhaustive pattern matches in low_level
2021-11-15 00:06:31 +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
Brian Carroll
daf6771bf5
Shorten the name of the Symbol for temporary Wasm values
2021-11-12 17:51:50 +00:00
satotake
d63849c5a3
Add List.takeFisrt2, List.takeLast2 for demo
2021-11-12 13:47:28 +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
Michael Downey
07cd3850d7
Merge branch 'trunk' into str_trim_left
2021-11-09 19:43:26 -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
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
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
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
73e2cbcb1e
Make versions numbers consistent and matching the lock files
2021-11-06 13:24:45 -07: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
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
Kevin Sjöberg
f9ed060e49
Implement List.map4
2021-10-31 21:08:41 +01:00
Chelsea Troy
e01942f387
Whoops, let's make List.max actually accessible on the frontend, lol
2021-10-30 19:23:08 -05:00
Chelsea Troy
4afaf96aea
Add List.max builtin
2021-10-30 19:17:35 -05:00
Folkert
e10cd07143
use Entry in symbol.rs
2021-10-29 21:25:11 +02: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
Folkert de Vries
29bd4e3e50
Merge branch 'trunk' into str_trim
2021-10-26 22:45:32 +02:00
Anton-4
d460ce64b1
Merge branch 'trunk' into str_from_int
2021-10-26 17:33:15 +02:00
Anton-4
45df20cb17
can now convert builtin calls to markup
2021-10-26 16:43:03 +02:00
Dan Knutson
e7523ad41d
add Roc wiring
2021-10-25 20:22:37 -05:00
Chelsea Troy
a4b5b81d60
Merge branch 'trunk' into add-list-dropLast
2021-10-25 11:49:27 -05:00
Anton-4
39974ea039
Merge branch 'trunk' of github.com:rtfeldman/roc into function_closure_to_mark_node
2021-10-25 14:34:58 +02:00
Chelsea Troy
fd83c3b749
Branch the dropLast functionality from dropAt, inserting an index gathered by subtracting 1 from the list length
2021-10-23 00:17:08 -05:00
Chelsea Troy
49a832d757
Add dropLast to tests and parser
2021-10-21 23:02:26 -05:00
Brian Carroll
95e38a36b6
Merge pull request #1784 from rtfeldman/wasm_reduce_set_get
...
Improve WasmBackend's output, and its structure
2021-10-19 18:19:10 +02:00
Anton-4
bb715e0f84
cleanup
2021-10-19 17:51:47 +02:00
Anton-4
c7c421b2f5
fixed scope lookup bug
2021-10-19 16:45:28 +02:00
Brian Carroll
64603a480c
Get rid of Option in VM stack model
2021-10-18 21:03:54 +02:00
Folkert
031c7cc2e2
Merge remote-tracking branch 'origin/trunk' into mono-lowlevel
2021-10-18 11:11:04 +02:00
Folkert
434ccbbf68
working parallel implementation
2021-10-17 20:42:29 +02:00
Folkert
4152519bfb
formatting & catch zig overflow error
2021-10-17 18:03:40 +02:00
Chelsea Troy
0cc6e44d35
Thread through the divCeil implementation from Zig:
...
+ OPEN QUESTION: Evidently the Zig implementation can throw an overflow error. Do we want to do something in Roc to fix this?
2021-10-17 10:46:16 -05:00
Chelsea Troy
03295d4369
So far, add type for divCeil to the language
2021-10-17 09:29:11 -05:00
Anton-4
a272765fc7
started using scope properly, improved error backtrace conversion
2021-10-16 19:37:20 +02:00
Anton-4
e003725f21
cleanup unwrap
2021-10-15 19:01:41 +02:00
Anton-4
37ba50e746
bug fixes involving IdentId
2021-10-11 20:16:22 +02:00
Anton-4
03d9d41a7a
debugging closure -> MarkupNode
2021-10-08 20:19:52 +02:00
Folkert de Vries
fa4875da83
Merge pull request #1761 from rtfeldman/giesch
...
Add List.dropAt
2021-10-04 15:01:17 +02:00
Richard Feldman
e3a8d436cf
Merge pull request #1607 from rtfeldman/editor-let-value
...
file loading/saving/running, headers, top level defs
2021-10-03 15:45:08 -05:00
Dan Knutson
3baff93a97
add first version of List.dropAt
...
* adds an implementation with no uniqueness/mutability
2021-10-03 13:55:11 -05:00
Kofi Gumbs
b32a42f05a
Add Str.repeat builtin
2021-09-29 17:32:42 -04:00
Anton-4
e05307ff1a
cleanup
2021-09-20 13:36:58 +02:00
Anton-4
3397d780b8
Merge branch 'trunk' of github.com:rtfeldman/roc into editor-let-value
2021-09-03 14:44:21 +02:00
Anton-4
6d6ae5d5c0
bug fixes, updated tests
2021-08-31 19:54:48 +02:00
Anton-4
3c858cff96
updating TLD value name works!
2021-08-30 19:49:47 +02:00
Anton-4
0135e7b9b1
changes to work with combination of Def2 and Expr2
2021-08-28 18:54:09 +02:00
Brendan Hansknecht
03bc61cbf8
Merge branch 'trunk' into gen-dev/records-base
2021-08-23 22:01:53 -07:00
Anton-4
04a0a220b3
fmt+clippy
2021-08-21 20:21:35 +02:00
Anton-4
fe1a2c35ff
merge fixes
2021-08-21 20:10:21 +02:00
Anton-4
169520f956
Merge branch 'trunk' of github.com:rtfeldman/roc into editor-let-value
2021-08-21 12:05:59 +02:00
Joshua Hoeflich
8d6260672f
Cargo fmt
2021-08-19 16:20:58 -05:00
Joshua Hoeflich
b57ebb6229
Remove castToNat
2021-08-19 16:11:21 -05:00
Anton-4
5ed5e2e6ee
fmt
2021-08-18 18:50:39 +02:00
Joshua Hoeflich
92da003fba
Adds castToNat
2021-08-18 11:02:20 -05:00
Anton-4
5023fa3e75
progress on setting up def parser for top level defs
2021-08-16 20:05:21 +02:00
Brendan Hansknecht
cc1b7df06a
Merge branch 'trunk' into gen-dev/records-base
2021-08-14 21:21:31 -07:00
Joshua Hoeflich
22e781259d
TODO: Actually implement the functions
2021-08-14 19:28:13 -05:00
Joshua Hoeflich
ff2c3d7945
Dummy implementation that doesn't do what we want
2021-08-14 17:59:53 -05:00
Anton-4
c6e816dfbe
progress on starting with existing file to enable using LoadedModule
2021-08-09 19:50:27 +02:00
Joshua Hoeflich
ae38a0d3ff
Cargo fmt
2021-08-08 21:41:00 -05:00
Joshua Hoeflich
c00d400d85
Fixes merge conflict
2021-08-08 21:38:15 -05:00
Richard Feldman
a5929ada4c
Update Dict docs
2021-08-08 20:03:57 -04:00
Joshua Hoeflich
4231b340ee
Glue code working
2021-08-08 11:06:10 -05:00
Richard Feldman
2a616103c6
Rename Str.toBytes to Str.toUtf8
2021-08-07 22:46:24 -04:00
Richard Feldman
f077f948b6
cargo fmt
2021-08-07 21:52:27 -04:00
Richard Feldman
267836226c
s/CodePoint/CodePt/g
2021-08-07 21:46:20 -04:00
Anton-4
334f91392a
let-value ast updating progress
2021-08-06 19:26:25 +02:00
Folkert
f301de5576
assert type sizes
2021-08-03 22:16:27 +02:00
Folkert
d4896d3ed2
remove inlinable_string dependency
2021-08-03 21:24:19 +02:00
Folkert
ceb5cc66fa
use IdentStr
2021-08-03 21:14:36 +02:00
Folkert
bd35770e9a
use in Lowercase
2021-08-03 19:30:29 +02:00
Folkert
9361f45610
use IdentStr for TagName
2021-08-03 19:28:28 +02:00
Folkert
e805e63db6
typos
2021-07-30 16:54:22 +02:00
Folkert
899cbeabd7
fix extra ampersands
2021-07-29 17:32:08 +02:00
Folkert
5282dbf41a
fix typo
2021-07-25 22:00:52 +02:00
Folkert
a801558f22
store declaration parameters in flat array
2021-07-25 15:18:27 +02:00
Folkert de Vries
d5c6fc7179
Merge branch 'trunk' into performance-tweaks
2021-07-22 22:43:16 +02:00
Folkert
7fa7ea08df
use insert to tell us if there is a duplicate
2021-07-21 18:43:26 +02:00
Jared Ramirez
67eef2c97f
Merge branch 'trunk' of https://github.com/rtfeldman/roc into add-dec-types
2021-07-08 16:47:42 -07:00
Jared Ramirez
4d6e5a1a4f
[WIP] Add Dec/Decimal builtin types
2021-06-23 19:30:16 -07:00
Folkert
059cac3b98
remove ListSetInPlace
2021-06-22 20:34:59 +02:00
Folkert
b20269d16d
clippy
2021-06-19 19:59:51 +02:00
Richard Feldman
53ccef0506
nightly clippy
...
I was on nightly for benchmarks, and these all seem reasonable.
2021-06-18 15:21:11 -04:00
tarjei
bec6e556d5
Merge branch 'trunk' into builtins/list-swap
2021-05-31 19:16:31 +02:00
tarjei
ade591dd10
Fix plumbing
2021-05-29 22:21:25 +02:00
tarjei
107822a5cc
Add plumbing for List.swap
2021-05-29 21:30:16 +02:00
Folkert
1b3bbaf5de
define one global static str
2021-05-28 23:56:52 +02:00
Richard Feldman
75ec2ecc7b
Merge pull request #1300 from rtfeldman/specialize-lowlevel
...
Polyvariant defunctionalization
2021-05-24 19:54:17 -04:00
Folkert
fbb711b2ca
Merge remote-tracking branch 'origin/trunk' into specialize-lowlevel
2021-05-24 15:11:40 +02:00
Richard Feldman
c8665fa9b2
Merge branch 'trunk' into hash-links
2021-05-24 08:25:11 -04:00
Richard Feldman
b60988d63e
Merge branch 'trunk' into morphic-lib
2021-05-24 07:18:59 -04:00
Richard Feldman
a7518a675a
Clean up some clippy warnings
2021-05-23 20:28:23 -04:00
Chadtech
46f5c7fadc
Merge branch 'trunk' into hash-links
2021-05-22 20:34:55 -04:00
Richard Feldman
6f8804f24a
Merge branch 'trunk' into gen_dev/mac-os
2021-05-22 18:20:37 -04:00
Richard Feldman
c5da16f071
Merge branch 'trunk' into morphic-lib
2021-05-22 15:21:50 -04:00
tarjei
f581b017e8
Enable writing dev backend on macOS
2021-05-22 20:56:40 +02:00
Chadtech
12c0067348
Created scope and idents for module docs, but they appear to be empty when the doc links function tries to use them
2021-05-22 14:06:56 -04:00
Folkert
9c32965a3d
remove unused var
2021-05-22 19:35:35 +02:00
tarjei
f45d89270b
Implement basic List.drop that satisfies tests
...
Issues with uniqueness and copying which leaks memory obviously needs to be fixed.
2021-05-18 22:59:55 +02:00
Folkert
2b72f9e733
add HigherOrderLowLevel
2021-05-16 22:49:57 +02:00
Brendan Hansknecht
2fc46b8752
WIP:struct
2021-05-16 13:28:21 -07:00
Folkert
e675bac893
make higher-order distinction in lowlevels
2021-05-16 22:13:13 +02:00
Folkert
27f8465e9c
clippy
2021-05-15 23:59:54 +02:00
Folkert
ca78439756
working Set.walk
2021-05-14 12:35:44 +02:00
Folkert
f1a8b75196
great success
2021-05-09 23:24:27 +02:00
Folkert
03d5f05226
to_ne_bytes
2021-05-08 14:26:03 +02:00
Folkert
352dacc5a3
build skeleton
2021-05-07 20:57:04 +02:00
Folkert
c071cfba13
implement startsWithCodePoint
2021-05-02 19:26:08 +02:00
Folkert
6633f8ca9f
add ExpectTrue lowlevel
2021-04-23 10:16:30 +02:00
Richard Feldman
0a50b0b488
Change license to UPL-1.0
...
Closes https://github.com/rtfeldman/roc/issues/1199
2021-04-21 19:18:44 -04:00
Folkert
383f35db5a
bump bumpalo
2021-04-18 14:36:47 +02:00
Richard Feldman
792a18816a
Update authors in Cargo.toml
2021-04-11 08:11:52 -04:00
Folkert
f73be5d4a0
fix naming
2021-04-03 21:23:40 +02:00
Eric Henry
ac001598e8
setup before zig work
2021-04-03 11:28:36 -04:00
Eric Henry
8e36b5797b
Merge branch 'trunk' of github.com:rtfeldman/roc into builtin-sortby
2021-04-03 10:03:45 -04:00
Folkert
f2c144f58c
Merge remote-tracking branch 'origin/can-builtins-simplify' into list-range
2021-03-31 11:34:32 +02:00
Folkert
5d8d2bb030
Merge remote-tracking branch 'origin/trunk' into can-builtins-simplify
2021-03-31 11:29:33 +02:00
Folkert
e3293f1ba9
remove list sum and product lowlevel ops
2021-03-30 22:55:27 +02:00
Folkert
5cfc9c1d85
implement List.sum and List.product in roc can AST
2021-03-30 22:19:37 +02:00
Eric Henry
7045737669
sortWith boilerplate done
2021-03-30 11:05:31 -04:00
Folkert
d718e21fd3
add List.range
2021-03-29 23:00:49 +02:00
Folkert
1302ee296f
refactor list walking
2021-03-29 16:32:43 +02:00
Richard Feldman
51e7720658
Merge branch 'trunk' into add-num-log
2021-03-28 12:43:51 -04:00
Ju Liu
928249df2a
Add Num.log and wire it up
2021-03-28 15:02:45 +01:00
Peter Fields
fed470b316
add list-product builtin function
2021-03-27 20:15:16 +00:00
Richard Feldman
eadb28b95d
Replace a bunch of Into impls with Froms
2021-03-26 08:39:01 -04:00
Richard Feldman
6e95d05a57
Add some more clippy allows
2021-03-26 07:46:16 -04:00
Folkert
9208000316
only store start position for PrecedenceConflict
2021-03-20 15:34:08 +01:00
Richard Feldman
1f29fc4358
Merge branch 'trunk' into singleton-to-single
2021-03-15 00:42:59 -04:00
Richard Feldman
9408a271d2
Merge branch 'trunk' into expression-move
2021-03-14 23:57:58 -04:00
Chadtech
1e9cf7ba89
Merge branch 'trunk' into singleton-to-single
2021-03-14 21:58:08 -04:00
Chadtech
b22672fb0e
Changed singleton to single
2021-03-14 21:57:10 -04:00
Eric Henry
1e9bd0d7f1
implement isMultipleOf builtin
2021-03-14 14:52:38 -04:00
Folkert
0be4704f94
checkpoint working parse tests
2021-03-13 15:49:07 +01:00
Eric Henry
66f07d984e
Merge branch 'trunk' of github.com:rtfeldman/roc into builtin-maxI128
2021-03-12 17:40:57 -05:00
Eric Henry
4d046abefa
builtin maxI128 initial
2021-03-09 12:47:42 -05:00
rvcas
268ab82410
feat(List): add map3
2021-03-08 21:12:19 -05:00
Folkert
dbb4758cb9
Merge remote-tracking branch 'origin/trunk' into backpassing
2021-03-06 19:01:39 +01:00
Folkert
d8bc44fd47
add Result.after
2021-03-06 01:53:37 +01:00
Folkert
2e73e47673
setup
...
just some stuff we need in place for the parser to recognice map2 and to give it a (hardcoded) type
2021-03-04 14:42:43 +01:00
Folkert
9116e9e8c9
add Str.toBytes
2021-02-21 19:52:32 +01:00
Folkert
43e71f2ee9
int cast
2021-02-21 16:07:35 +01:00
Folkert
128741e585
add right shift operators
2021-02-21 16:01:01 +01:00
Folkert
93359b88cb
Merge remote-tracking branch 'origin/str-fromUtf8' into bytes
2021-02-21 15:31:49 +01:00
Folkert
57b78dde06
Merge remote-tracking branch 'origin/trunk' into str-fromUtf8
2021-02-21 15:25:36 +01:00
Folkert
ea76578e06
add Num.bitwiseOr and Num.shiftLeftBy
2021-02-21 15:15:16 +01:00
Folkert
20921f94fb
don't abuse var symbols
2021-02-19 17:08:22 +01:00
Folkert
65ab08728a
List.mapWithIndex
2021-02-17 22:29:15 +01:00
Folkert
3fe80b1a1e
List.keepOks and List.keepErrs
2021-02-17 21:03:21 +01:00
Folkert
42c5662872
List.map in zig!
2021-02-17 15:38:55 +01:00
Folkert
49ca8f3e86
add Set.fromList
2021-02-16 00:51:23 +01:00
Folkert
5826da028c
add Set.contains
2021-02-16 00:12:57 +01:00
Folkert
13b2c23c01
working AStar
2021-02-15 21:34:55 +01:00
Folkert
35e1e94a94
implement Set.walk
2021-02-15 01:49:25 +01:00
Folkert
57e8d5b4c3
implement Set inclusion functions
2021-02-14 23:57:35 +01:00
Folkert
1256327caa
dict walk
2021-02-14 21:16:42 +01:00
Folkert
02db8f1a05
union and intersection
2021-02-14 19:55:01 +01:00
Folkert
e7efcb74e6
Merge remote-tracking branch 'origin/gen-equality' into dict-insert
2021-02-13 19:45:33 +01:00
Folkert
16143bc06e
first steps for Dict.keys and Dict.values
2021-02-13 18:35:36 +01:00
Folkert
ac5eb0f6f6
Dict.get
2021-02-13 16:12:45 +01:00
Richard Feldman
76a9461cfe
Merge branch 'trunk' into gen-equality
2021-02-12 19:13:01 -05:00
Folkert
afe2f51660
basic versions of contains and remove
2021-02-12 23:47:02 +01:00
Folkert
ee21f86f8f
hooking everything up
2021-02-12 17:18:06 +01:00
Folkert
129f85b1f5
hash tag & struct
2021-02-10 16:48:04 +01:00
Folkert
45d8bff072
equality for structs
2021-02-09 23:14:08 +01:00
Folkert
b6ceaab341
first steps for init
2021-02-09 22:47:38 +01:00
Jared Ramirez
815f633a58
[WIP] Setup rust side to call Str.fromUtf8
2021-02-07 20:04:10 -08:00