Ayaz Hafiz
9b7c4bf367
Debug assertion should be negated
2023-03-25 15:01:40 -05:00
Folkert de Vries
ffaa4a1c1d
Merge pull request #5178 from roc-lang/i5089
...
Ranged number abilities are derived and compiled correctly
2023-03-22 22:21:18 +01:00
Ayaz Hafiz
240c1f35d6
Ranged number abilities are derived and compiled correctly
...
Closes #5089
2023-03-22 09:42:06 -05:00
Ayaz Hafiz
3603183817
Apply opaque pointer recasting to all recursive layouts
2023-03-22 08:21:09 -05:00
Ayaz Hafiz
3a960e7809
Properly recast nested recursion pointers to their expanded layouts as needed
...
When we load a structure with a nested recursive pointer, the pointer
may be loaded opaquely. We need to refine it to the concrete type wanted
by the layout.
This conversion can be removed after we upgrade to LLVM 15.
Closes #5162
2023-03-22 08:21:08 -05:00
Ayaz
6b3f3ba1a1
Merge pull request #5167 from roc-lang/fix-closure-captures-recursive
...
Ensure that closures inside recursive closures capture correctly
2023-03-21 13:53:33 -04:00
Richard Feldman
2276c78d9f
Merge pull request #5093 from roc-lang/glue-getters-rtfeldman
...
Glue for functions and closures
2023-03-21 08:12:19 -04:00
Ayaz Hafiz
700d2d1b31
Check in mono golden
2023-03-21 07:18:12 -04:00
Anton-4
f11bf90d6d
values name change
2023-03-21 11:34:10 +01:00
Ayaz Hafiz
e8a29d2df4
Ensure that closures inside recursive closures capture correctly
...
With a code like
```
thenDo = \x, callback ->
callback x
f = \{} ->
code = 10u16
bf = \{} ->
thenDo code \_ -> bf {}
bf {}
```
The lambda `\_ -> bf {}` must capture `bf`. Previously, this would not
happen correctly, because we assumed that mutually recursive functions
(including singleton recursive functions, like `bf` here) cannot capture
themselves.
Of course, that premise does not hold in general. Instead, we should have
mutually recursive functions capture the closure (haha, get it) of
values captured by all functions constituting the mutual recursion.
Then, any nested closures can capture outer recursive closures' values
appropriately.
2023-03-20 17:44:59 -04:00
Anton-4
8da9af94f2
use latest basic-cli, better error messages
2023-03-20 20:06:36 +01:00
Anton-4
9c0d2a2eb0
some style changes
2023-03-18 14:22:52 +01:00
Seth Workman
29e0673308
update dict.txt
2023-03-17 11:33:39 -05:00
Seth Workman
deadd19de0
Merge branch 'roc-lang:main' into builtin-dict-docs
2023-03-17 11:02:57 -05:00
Seth Workman
dccb1be5b5
fix naming to be relevant to example
2023-03-17 08:36:50 -05:00
Seth Workman
fea1cfa57d
fix walkUntil test/example and formatting
2023-03-17 08:33:01 -05:00
Anton-4
f1b1aa6a7b
Merge branch 'main' of github.com:roc-lang/roc into glue-getters-rtfeldman
2023-03-17 11:34:29 +01:00
Seth Workman
f912c39a04
add docs/tests to Dict builtin
2023-03-16 22:44:50 -05:00
Brendan Hansknecht
2a6c82c937
fix bug where we don't decrement elements if the list is non-unique
2023-03-16 12:12:28 -07:00
Brendan Hansknecht
a955a4937c
misc list refcounting updates
2023-03-16 12:12:28 -07:00
Brendan Hansknecht
ce29c7e92f
fix bugs from recent changes and additions
2023-03-16 12:12:27 -07:00
Brendan Hansknecht
00a3d7b259
update mono tests
2023-03-15 16:44:02 -07:00
Brendan Hansknecht
48f17a8e2c
add Str.releaseExcessCapacity
2023-03-15 15:24:59 -07:00
Folkert
8b00e071ab
fix wrong field name in wasm helpers
2023-03-15 22:17:23 +01:00
Brendan Hansknecht
b8e42b05a2
misc cleanup
2023-03-15 13:25:45 -07:00
Brendan Hansknecht
8d5a182f83
fmt
2023-03-15 13:25:45 -07:00
Brendan Hansknecht
dbead004c5
clippy
2023-03-15 13:25:45 -07:00
Brendan Hansknecht
782411cfcb
correct passing str to sub function
2023-03-15 13:25:44 -07:00
Brendan Hansknecht
19039ea5bd
fix edge cases
2023-03-15 13:25:44 -07:00
Brendan Hansknecht
3dd16d2114
fix pushing to alloca
2023-03-15 13:25:44 -07:00
Brendan Hansknecht
70eef9141f
port string functions to seamless slices
2023-03-15 13:25:40 -07:00
Brendan Hansknecht
8f96295ab1
fix wasm test loading of seamless slices
2023-03-15 13:23:35 -07:00
Brendan Hansknecht
3978059aa2
add seamless slices for str
2023-03-15 13:23:34 -07:00
Brendan Hansknecht
0f708d7577
fix accessing bug
2023-03-15 10:06:31 -07:00
Brendan Hansknecht
88a69a23a8
fix type to work on 32bit platforms
2023-03-15 10:06:31 -07:00
Brendan Hansknecht
7f3c67ade9
use isValidUnicode in fromUtf8 to make it faster. Also fix off by one bug.
2023-03-15 10:06:31 -07:00
Brendan Hansknecht
f6677f3c1f
Add a fast path for validating ASCII charcters
...
From my quick testing using the code for testing this function in zig standard lib:
small ascii: 2.2x
small unicode: 0.9x
medium ascii: 15x
medium unicode: 1.01x
medium mix: 3.25x
large ascii: 32.8x
large unicode: 1.03x
large mixed: 3.35x
small being less than 8 bytes.
large being roughly greater than 512 bytes.
2023-03-15 10:06:31 -07:00
Luke Boswell
dd0fdd5d74
roc format
2023-03-15 18:54:46 +11:00
Luke Boswell
2241b173bf
return markdown headings to preserve structure
2023-03-15 18:30:44 +11:00
Luke Boswell
90dd31aaca
update mono
2023-03-15 18:24:16 +11:00
Luke Boswell
91604f8be6
return structure using <h2> elements, fix css
2023-03-15 18:19:33 +11:00
Luke Boswell
ca2158edbb
simplify Set examples
2023-03-15 18:12:17 +11:00
Luke Boswell
5dde76c4ba
modify examples
2023-03-15 18:09:59 +11:00
Luke Boswell
ef0de4c72f
merge builtin-json
2023-03-15 18:07:01 +11:00
Luke Boswell
1fe56bcefb
adds docs for Json
2023-03-15 16:30:39 +11:00
Luke Boswell
d8d3d252f1
fix empty list test
2023-03-15 09:56:33 +11:00
Luke Boswell
28951a7a16
spellcheck
2023-03-14 19:39:53 +11:00
Luke Boswell
d2bb434092
roc format
2023-03-14 18:36:12 +11:00
Luke Boswell
213111ca55
minor doc fixes, add docs for Set
2023-03-14 18:33:59 +11:00
Brendan Hansknecht
9e2a36f1d4
update mono
2023-03-13 18:03:05 -07:00