Commit Graph

3710 Commits

Author SHA1 Message Date
Brian Carroll
71be775f61
repl_test: On Roc compiler error, panic with the error message 2022-07-05 07:03:13 +01:00
Folkert
36c8723214
update mono tests 2022-07-05 00:52:10 +02:00
Folkert
f86f2e2bdd
format 2022-07-05 00:51:10 +02:00
Folkert
6095dcff66
Merge remote-tracking branch 'origin/trunk' into list-unreachable 2022-07-04 19:21:31 +02:00
Folkert
2293aa2a91
fix mono tests 2022-07-04 18:02:37 +02:00
Folkert
6d7c329698
Str.walkScalars 2022-07-04 18:01:19 +02:00
Folkert
1de9270ecf
Merge remote-tracking branch 'origin/trunk' into str-walk 2022-07-04 16:30:07 +02:00
Folkert
9c41a4d442
str.appendScalar 2022-07-04 16:27:04 +02:00
Brian Carroll
62e93dd921
wasm: enable test for List.mapWithIndex 2022-07-04 15:14:52 +01:00
Brian Carroll
40231535fa
builtins: Delete Zig implementation of List.mapWithIndex 2022-07-04 15:14:32 +01:00
Brian Carroll
a5a85d7d73
mono: delete HigherOrder variant ListMapWithIndex 2022-07-04 15:10:31 +01:00
Brian Carroll
eb2ac4c82b
module: delete LowLevel enum variant ListMapWithIndex 2022-07-04 15:07:12 +01:00
Brian Carroll
a129e0458c
can: delete AST implementation of List.mapWithIndex 2022-07-04 15:06:45 +01:00
Brian Carroll
557ae4dd9c
builtins: Implement List.mapWithIndex in pure Roc 2022-07-04 14:57:18 +01:00
Folkert
ab721dd3c1
Str.reserve 2022-07-04 14:57:20 +02:00
Folkert de Vries
4523e90bc7
Merge pull request #3398 from rtfeldman/wasm-str-full-coverage
Wasm Str: 100% tests passing
2022-07-04 14:51:52 +02:00
Folkert
f7b8094dfb
expose countUtf8Bytes 2022-07-04 13:59:19 +02:00
Folkert
a9ba08d8cb
appendScalar zig implementation 2022-07-04 13:58:39 +02:00
Folkert
4f965ec263
fix RocStr.capacity() in zig 2022-07-04 13:39:51 +02:00
Folkert de Vries
e0b5f16516
Merge pull request #3390 from rtfeldman/clean
Leftover file cleanup
2022-07-04 13:19:20 +02:00
Folkert de Vries
1441e8c347
Merge pull request #3392 from rtfeldman/wasm-boxed-eq-and-refcount
Dev backends: Eq and refcount for Boxed layout
2022-07-04 13:17:37 +02:00
Brian Carroll
f4ed7e086e
wasm: turn off debug features 2022-07-04 12:13:10 +01:00
Brian Carroll
fdc0851883
wasm: fix Str.fromUtf8Range 2022-07-04 11:52:18 +01:00
Brian Carroll
e1d8d09472
builtins: move the output argument of Zig fromUtf8RangeC to first position 2022-07-04 11:24:39 +01:00
Brian Carroll
60d29c2e25
builtins: Move return pointer to first position for fromUtf8C 2022-07-04 11:24:39 +01:00
Brian Carroll
a342f02824
wasm: fix Str.fromUtf8 2022-07-04 11:24:38 +01:00
Brian Carroll
02ec30425c
wasm: Implement Str.split 2022-07-04 11:24:38 +01:00
Mfon Eti-mfon
33a6c9e6c5
Docs UI: Style the currently active nav link 2022-07-04 04:18:12 +01:00
Richard Feldman
b9532cadaa
clippy 2022-07-03 22:47:41 -04:00
Richard Feldman
cab096b4e1
Don't print extra newline in multiline | patterns 2022-07-03 22:43:21 -04:00
Richard Feldman
d1ba89f97f
Fix an extraneous newline in formatting 2022-07-03 22:38:26 -04:00
Richard Feldman
244a501433
Indent for multiline | patterns 2022-07-03 22:17:13 -04:00
Richard Feldman
872efa9724
Put a space before comments in patterns 2022-07-03 21:59:00 -04:00
Richard Feldman
3e2f581db4
Reproduce formatter bug 2022-07-03 21:58:59 -04:00
Richard Feldman
e4d09e9e59
Drop obsolete comment 2022-07-03 21:57:56 -04:00
Richard Feldman
d2dbb0001a
Merge pull request #3393 from rtfeldman/mfonism/docs-ui/create-borders-around-module-entries
Docs UI: Create borders around module entries
2022-07-03 20:30:38 -04:00
Ayaz Hafiz
cda740a472
Correct LLVM box eq build 2022-07-03 20:08:23 -04:00
Mfon Eti-mfon
eee30fb58c
docs-ui: Add border to and style wrapping section 2022-07-04 00:17:34 +01:00
Brian Carroll
6b1e9c75c8
mono: generate refcounting helper functions for Boxed layout 2022-07-03 23:31:49 +01:00
Folkert de Vries
4ab3afd8c8
Merge pull request #3388 from rtfeldman/remove_tag_name
Remove `tag_name` from mono IR AST
2022-07-04 00:28:09 +02:00
Mfon Eti-mfon
873142b473
docs-ui: Wrap module entry defs in section elements 2022-07-03 23:04:57 +01:00
Ayaz Hafiz
35243e0efe
Leftover file cleanup
- Remove a toplevel directory accidentally re-added in #3352
- Remove mono tests renamed but not properly removed in #3352
2022-07-03 16:53:06 -04:00
Ayaz Hafiz
ba1a3fa62e
Remove unnecessary import 2022-07-03 16:49:09 -04:00
Ayaz Hafiz
2726a3506f
Remove tag_name from Expr::Tag 2022-07-03 16:48:51 -04:00
Ayaz
04046cef39
Merge pull request #3387 from rtfeldman/goldens
Use `insta` snapshot tests for all reporting tests
2022-07-03 16:48:05 -04:00
Ayaz Hafiz
2d169bf518
Remove tag_name from ResetReuse 2022-07-03 16:47:01 -04:00
Folkert
5904934887
rename countBytes -> countUtf8Bytes 2022-07-03 21:49:01 +02:00
Folkert
5f2c7c5b5e
update mono tests 2022-07-03 20:26:04 +02:00
Folkert
65f80b61c6
add Str.walkUtf8WithIndex 2022-07-03 20:24:08 +02:00
ayazhafiz
b490a1fdf8
Replace other test_reporting tests with snapshots 2022-07-03 14:19:57 -04:00
Folkert
23248e6f7d
Cargo.lock 2022-07-03 19:47:53 +02:00
Folkert
eeb271d07f
Str.splitFirst and Str.splitLast 2022-07-03 19:47:06 +02:00
Brian Carroll
7c7e450756
mono: generate Eq functions for Boxed layout 2022-07-03 18:42:35 +01:00
ayazhafiz
375b3e064a
Use insta snapshot tests in reporting tests 2022-07-03 12:58:27 -04:00
Folkert
be3800d7fa
add substringUnsafe roc function 2022-07-03 17:15:25 +02:00
Anton-4
de0ac56329
editor wgpu12+path fix 2022-07-03 17:09:26 +02:00
ayazhafiz
671a19b29d
Fix mono 2022-07-03 10:39:55 -04:00
ayazhafiz
71e3e0baff
Add dedup niche test golden 2022-07-03 10:37:40 -04:00
ayazhafiz
3385c708c6
Deduplicate capture niches 2022-07-03 10:37:40 -04:00
ayazhafiz
91050d9989
Add solve test for same layout different niche 2022-07-03 10:37:40 -04:00
ayazhafiz
ae410fbf5d
Fix mono tests 2022-07-03 10:37:39 -04:00
Ayaz
6c9b10af4e
Update wasm layout sizes 2022-07-03 10:37:36 -04:00
Ayaz Hafiz
a3ffc12569
Revert unneeded changes 2022-07-03 10:37:36 -04:00
Ayaz Hafiz
cb2f85ed95
Fix some typos 2022-07-03 10:37:36 -04:00
Ayaz Hafiz
74a55664dd
Remove some unneeded changes 2022-07-03 10:37:36 -04:00
Ayaz Hafiz
8855f269ba
Make captures niche more private 2022-07-03 10:37:36 -04:00
Ayaz Hafiz
71d612078a
no_niche to represent lack of captures niche 2022-07-03 10:37:36 -04:00
Ayaz Hafiz
a5ea4f8c11
Remove references to multimorphic names 2022-07-03 10:37:35 -04:00
Ayaz Hafiz
641bd95d04
Make sure accessor closures get the name of their assigned def, if any 2022-07-03 10:37:35 -04:00
Ayaz Hafiz
276db791bd
Update capture niche tests 2022-07-03 10:37:35 -04:00
Ayaz Hafiz
d08aecf55f
Rename multimorphic tests to capture niche 2022-07-03 10:37:34 -04:00
Ayaz Hafiz
019ebd93f7
Put the capture niche in the lambda name instead of generating new names 2022-07-03 10:37:29 -04:00
ayazhafiz
1ed2e1a8e9
Improve test 2022-07-03 10:37:28 -04:00
ayazhafiz
ffa2ba1043
Fix solve tes 2022-07-03 10:37:28 -04:00
Ayaz Hafiz
98b310a604
Fix wasm test gen 2022-07-03 10:37:28 -04:00
Ayaz Hafiz
fe318488e2
Add more multimorphic gen tests 2022-07-03 10:37:28 -04:00
Ayaz Hafiz
28c1cf46a3
Multimorphic lambdas capture another lambda 2022-07-03 10:37:28 -04:00
Ayaz Hafiz
b69d538ea0
Add mono test cases 2022-07-03 10:37:27 -04:00
Ayaz Hafiz
806e2f5096
Make sure to properly preserve lambda set ordering 2022-07-03 10:37:27 -04:00
Ayaz Hafiz
1903ce4db9
Remove LambdaName::from_non_multimorphic 2022-07-03 10:37:27 -04:00
Ayaz Hafiz
9714376b64
Use one method for mutex 2022-07-03 10:37:27 -04:00
Ayaz Hafiz
eb400590cc
Clippy 2022-07-03 10:37:27 -04:00
Ayaz Hafiz
d63eb23664
Fix compile errors 2022-07-03 10:37:27 -04:00
Ayaz Hafiz
ada4b0ea43
Add test gen for multimorphic capture 2022-07-03 10:37:26 -04:00
Ayaz Hafiz
8be230695b
Get multimorphic lambda captures working 2022-07-03 10:37:26 -04:00
Ayaz Hafiz
88618c098d
Unify lambda sets with left/right closure capture differences 2022-07-03 10:37:26 -04:00
Ayaz Hafiz
5f8b509cb3
Fixup compile errors 2022-07-03 10:37:26 -04:00
Ayaz Hafiz
51978e08ed
First pass at supporting multimorphic lambdas in lambda sets 2022-07-03 10:37:26 -04:00
ayazhafiz
1c40ad6127
Check if function doesn't need closure arg without associated method 2022-07-03 10:37:25 -04:00
Ayaz Hafiz
ca87faa906
Allow union lambdas to have duplicates 2022-07-03 10:37:25 -04:00
Ayaz Hafiz
8fb9ccccfe
Allow captures to be marked as unified without having to be merged
It's very possible to unify two variables without their actual variable
numbers having been merged in the unification forest. We might want to
do that in the future, but it's not necessarily true today. For example
two concrete constructors `{}` and `{}` are unified by their contents,
but the variables are not necessarily merged afterward.
2022-07-03 10:37:25 -04:00
Ayaz Hafiz
cecb6987e7
Admit duplicate lambdas in lambda sets when their captures don't unify 2022-07-03 10:37:25 -04:00
Folkert
45eb8b9d77
add substringUnsafe in zig 2022-07-03 15:10:14 +02:00
Anton-4
46bdd4072a
writeln->println, ignore clippy 2022-07-03 14:48:03 +02:00
Folkert
3cd56c3184
add Str.countBytes 2022-07-03 14:16:47 +02:00
Anton-4
7c93d237ce
Merge branch 'trunk' of github.com:rtfeldman/roc into rust61 2022-07-03 14:14:24 +02:00
Brian Carroll
b2c094ca07
Merge pull request #3379 from rtfeldman/wasm-box
Wasm box & unbox
2022-07-03 12:55:48 +01:00
Folkert
1f943a5452
add Str.getUnsafe 2022-07-03 13:46:22 +02:00
Marten/Qqwy
ce0bbbcef4
Fix segfault of List.range 0 3 2022-07-03 13:16:01 +02:00
Folkert
eefba96a16
format roc code 2022-07-03 13:02:41 +02:00
Brian Carroll
817ffba982
formatting 2022-07-03 10:59:19 +01:00
Brian Carroll
7ea9854e49
wasm: Refactor and bug-fix copy_value_from_memory 2022-07-03 10:22:11 +01:00
Brian Carroll
07a432581f
wasm: start implementing Box and Unbox (bugs!) 2022-07-03 09:47:53 +01:00
Folkert
8a611fdb34
use unreachable to implement walk 2022-07-03 03:01:23 +02:00
Folkert
762258ae20
Merge remote-tracking branch 'origin/trunk' into list-unreachable 2022-07-03 02:54:15 +02:00
Folkert de Vries
2a82d24847
Merge pull request #3369 from rtfeldman/pure-roc-list-walk
List.walk and friends in pure Roc
2022-07-03 02:32:43 +02:00
Folkert
2e0e867f32
format 2022-07-03 01:33:05 +02:00
Folkert de Vries
0d17f007d1
Merge pull request #3376 from rtfeldman/wasm-list-drop-at
implement List.dropAt for the wasm backend
2022-07-03 00:58:42 +02:00
Folkert de Vries
d2c07f350d
Merge pull request #3371 from rtfeldman/starts-with-scalar
Str.startsWithCodePt -> Str.startsWithScalar
2022-07-03 00:22:21 +02:00
Folkert de Vries
75b4b3a206
Merge pull request #3365 from rtfeldman/to-scalars
Add Str.toScalars builtin
2022-07-02 23:04:28 +02:00
Brian Carroll
94181111be
Merge branch 'trunk' of github.com:rtfeldman/roc into pure-roc-list-walk 2022-07-02 21:44:42 +01:00
Folkert
00397db8b6
implement List.dropAt for the wasm backend 2022-07-02 22:20:34 +02:00
Richard Feldman
af05723d35
Rename startsWithCodePt to startsWithScalar 2022-07-02 15:51:33 -04:00
Folkert
8d6cdb6577
shift -> multiply 2022-07-02 21:48:57 +02:00
Folkert
3792edec7f
rust format 2022-07-02 21:35:06 +02:00
Richard Feldman
c9e52b8311
Have startsWithCodePt share code with toScalars 2022-07-02 15:28:10 -04:00
Richard Feldman
cfb33cb414
Fix bug in 3-byte and 4-byte toScalars 2022-07-02 15:25:33 -04:00
Richard Feldman
077c37d9fb
Use alignCast over intToPtr 2022-07-02 15:22:29 -04:00
Richard Feldman
284ff5de35
Enable some missing tests 2022-07-02 15:22:20 -04:00
Folkert
302bafa428
update mono tests 2022-07-02 19:40:06 +02:00
Folkert
506e374642
List.unreachable 2022-07-02 19:40:05 +02:00
Folkert
543615292a
update mono tests 2022-07-02 19:38:38 +02:00
Folkert
e29a89d33c
remove zig implementation of keepIf/keepErrs/keepOks 2022-07-02 19:38:38 +02:00
Folkert
addb27164e
implement keepOks and keepErrs in pure roc 2022-07-02 19:38:37 +02:00
Folkert
6324fd632d
remove manual can implementation of takeFirst/takeLast 2022-07-02 19:38:37 +02:00
Folkert
616ddd6fe4
implement keepIf in pure roc 2022-07-02 19:38:36 +02:00
Brian Carroll
fdbcbb74dd
Format List.roc 2022-07-02 18:25:09 +01:00
Richard Feldman
d3ef05970f
zig fmt 2022-07-02 13:13:29 -04:00
Richard Feldman
9c9577c084
Add strToScalars empty string test 2022-07-02 13:13:28 -04:00
Richard Feldman
1b872022bb
Don't let fromSlice allocate when slice is empty 2022-07-02 13:13:28 -04:00
Folkert
409193f905
call_str -> call_list 2022-07-02 13:13:28 -04:00
Richard Feldman
09a656640e
Fix an incorrect var 2022-07-02 13:13:27 -04:00
Richard Feldman
40d90c9fb3
Add doc comment for toScalars 2022-07-02 13:13:27 -04:00
Richard Feldman
348ca970d6
Add gen tests for Str.toScalars 2022-07-02 13:13:27 -04:00
Richard Feldman
092654c463
Fix mono tests 2022-07-02 13:13:19 -04:00
Richard Feldman
810fcb307d
Delete some comments which reproduced a formatter bug 2022-07-02 13:12:14 -04:00
Richard Feldman
acb7cf99e1
Add Str.toScalars builtin 2022-07-02 13:12:12 -04:00
Richard Feldman
b1fe76adbf
Export Str.toScalars from Zig 2022-07-02 13:11:46 -04:00
Richard Feldman
5f20d31617
Add more strToScalars tests 2022-07-02 13:11:45 -04:00
Richard Feldman
9803e3ab01
Fix bug with 2-byte UTF-8 chars 2022-07-02 13:11:45 -04:00
Richard Feldman
598d03737c
Use RocStr.fromSlice in test 2022-07-02 13:11:45 -04:00
Richard Feldman
46c96be6ce
Rename toCodePts to toScalars
These code points will all be Unicode Scalar Values,
so might as well be more precise about the name.
2022-07-02 13:11:44 -04:00
Richard Feldman
44ba24df46
Improve strToCodePts 2022-07-02 13:11:44 -04:00
Richard Feldman
ce6c2f330c
Improve some RocList functions in zig 2022-07-02 13:11:43 -04:00
Richard Feldman
6f5baa5021
Use alignOf instead of sizeOf 2022-07-02 13:11:43 -04:00
Richard Feldman
47216b9905
Add RocStr.strToCodePts in Zig 2022-07-02 13:11:43 -04:00
Richard Feldman
6cdf63b319
Add some zig helpers to RocList 2022-07-02 13:11:42 -04:00
Richard Feldman
d4c1ac4afa
Fix error in comment 2022-07-02 13:11:42 -04:00
Richard Feldman
ff596f5e75
Add RocList.first_elem_ptr to list.zig 2022-07-02 13:11:42 -04:00
Brian Carroll
219e6d11cf
Merge branch 'trunk' of github.com:rtfeldman/roc into pure-roc-list-walk 2022-07-02 18:08:43 +01:00
Anton-4
6b56061b91
wasm compiler path fix 2022-07-02 14:00:42 +02:00
Anton-4
9b4529bf25
updated mono tests 2022-07-02 12:39:33 +02:00
Anton-4
b74fc3554b
Merge branch 'trunk' of github.com:rtfeldman/roc into crates-folder 2022-07-02 12:35:19 +02:00
Anton-4
80226143e0
update mono tests 2022-07-02 11:02:10 +02:00
Anton-4
b1b9a8dc0a
Merge branch 'trunk' of github.com:rtfeldman/roc into crates-folder 2022-07-02 10:44:25 +02:00
Anton-4
4fc2d808f3
fix str.zig finding 2022-07-01 20:35:15 +02:00
Anton-4
e4d8c1e88e
updated mono tests, fixed earthly dir copy 2022-07-01 19:15:36 +02:00
Anton-4
ef68d821f1
Merge branch 'trunk' of github.com:rtfeldman/roc into crates-folder 2022-07-01 17:43:05 +02:00
Anton-4
59609aa5f2
removed dbg 2022-07-01 17:41:53 +02:00
Anton-4
eee85fa45d
moved all crates into seperate folder + related path fixes 2022-07-01 17:37:43 +02:00