Ayaz Hafiz
3aab378bab
Correct pattern matching of nullable wrapped tag unions
...
The nullable ID always has zero tags. For everything else, we should
just match with the arity of the number of arguments, which doesn't
include the tag ID.
2022-12-29 12:22:05 -06:00
Ayaz Hafiz
d59b137f45
Implement printing of nullable wrapped IR layouts
2022-12-29 12:17:46 -06:00
Ayaz Hafiz
58930cc96c
Correct ircheck of nullable-wrapped unions
2022-12-29 12:10:23 -06:00
Ayaz Hafiz
14ea3518dc
Unnecessary reference
2022-12-29 11:42:51 -06:00
Ayaz Hafiz
0011636ba9
Allow all the arguments
2022-12-29 11:42:24 -06:00
Folkert
0eb41ad97f
another conditional compilation fix
2022-12-29 18:42:06 +01:00
Ayaz Hafiz
759f8d86af
Fix lifetime errors due to interner
...
In the llvm backend, there are the lifetimes `'a` (lifetime of the
global arena) and `'ctx` (lifetime of constructed LLVM values). `'a`
lives longer than `'ctx`, but the compiler didn't enforce this until
the layout interner was introduced, for some reason. We have to make
sure that containers of lifetime `'a` have no `'ctx` references.
2022-12-29 11:38:34 -06:00
Folkert
2606917d57
fix wasm executable extension
2022-12-29 17:05:46 +01:00
Ayaz Hafiz
512a1721ae
Push mutable layout interner through llvm backend
2022-12-29 10:04:43 -06:00
Folkert
6e2e5600df
conditional compilation fix
2022-12-29 16:50:22 +01:00
Folkert
aca8d98ad9
fix dev test compilation
2022-12-29 16:50:22 +01:00
Folkert
23b52894cc
fix test
2022-12-29 16:50:21 +01:00
Folkert
479caaf0a9
clean up path usage
2022-12-29 16:50:21 +01:00
Folkert
356875a851
simplify host extension
2022-12-29 16:50:20 +01:00
Folkert
1995d8b3df
refactor cli/src/build.rs
2022-12-29 16:50:20 +01:00
Folkert
a2c760aa56
keep conditional compilation local
2022-12-29 16:50:20 +01:00
Folkert
26e5ac85d4
remove argument from the from_str functions
2022-12-29 16:50:19 +01:00
Folkert
e44bf59334
remove argument from load_and_monomorphize
2022-12-29 16:50:19 +01:00
Folkert
92da3973e7
remove argument from load_and_typecheck
2022-12-29 16:50:19 +01:00
Ayaz
d6c32ded7d
Merge pull request #4829 from roc-lang/fix-holl-reference-borrow
...
Collect references to functions passed to HOLLs in borrow inference
2022-12-29 09:15:26 -06:00
Ayaz Hafiz
e4b5252e51
List takes interned element
2022-12-29 08:52:37 -06:00
Ayaz Hafiz
f2a42affd1
Fix wasm module
2022-12-29 08:18:06 -06:00
Ayaz Hafiz
650d3e6321
Fix gen dev
2022-12-29 08:14:35 -06:00
Ayaz
db86b874e1
Merge pull request #4830 from roc-lang/list-concat-memory-leak
...
fix memory leak in List.concat
2022-12-28 23:23:05 -06:00
Richard Feldman
6721e731f4
Merge pull request #4812 from roc-lang/module-header-docs
...
Module header docs
2022-12-28 21:22:53 -05:00
Ayaz Hafiz
c03c0b2978
Fix mutability lint in debug mode
2022-12-28 19:05:03 -06:00
Ayaz Hafiz
5ad796271e
Ignore unused vars
2022-12-28 18:55:24 -06:00
Ayaz Hafiz
d71d8fc795
Remove unneeded var
2022-12-28 18:54:31 -06:00
Ayaz Hafiz
62ac3545af
Avoid unneeded mut in release
2022-12-28 18:54:12 -06:00
Ayaz Hafiz
ed9804248c
Unnecessary mut ref
2022-12-28 18:52:45 -06:00
Ayaz Hafiz
1878fc1c4f
Allow too many args
2022-12-28 18:52:26 -06:00
Ayaz Hafiz
7ab7fdfa7b
Push interned layouts as mut throughout the backend, and intern box layouts
2022-12-28 18:51:26 -06:00
Ayaz Hafiz
dd6a72fc46
Update mono tests
...
These have changed because of how interned layouts are now sorted.
2022-12-28 18:50:50 -06:00
Folkert
05e23f8c5c
decref owned but empty list in List.concat
2022-12-29 00:13:24 +01:00
Ayaz Hafiz
1aa89fc567
Remove dead code
2022-12-28 17:08:05 -06:00
Ayaz Hafiz
58a28bb7b8
Intern unwrapped capture layout
2022-12-28 17:06:44 -06:00
Ayaz Hafiz
7045001f64
Intern captures layouts
2022-12-28 17:05:04 -06:00
Ayaz Hafiz
db547a600a
Turn off false-positive producing debug assert for now
...
See #4831
2022-12-28 16:31:25 -06:00
Ayaz Hafiz
2f7c4b4083
Macro to recruse when resolving recursive layouts
2022-12-28 16:01:01 -06:00
Folkert
2dfa7d6ef1
fix memory leak in List.concat
2022-12-28 22:52:32 +01:00
Ayaz Hafiz
a31b617ac8
Collect references to functions passed to HOLLs in borrow inference
...
During borrow inference, SCCs of references between procs are first
constructed. Previously we didn't collect any references for HOLL calls,
but since such calls pass a Roc-function, we need to include a reference
to the Roc function.
2022-12-28 15:32:23 -06:00
Ayaz
562a2748cb
Merge branch 'main' into i4732
...
Signed-off-by: Ayaz <20735482+ayazhafiz@users.noreply.github.com>
2022-12-28 11:56:08 -06:00
Ayaz
fe2bab56f9
Merge pull request #4819 from roc-lang/i4717
...
Compile anonymous closures with multiple specializations, and various fixes to lambda set compilation
2022-12-28 11:45:04 -06:00
Folkert de Vries
f4894183d7
Merge pull request #4823 from roc-lang/fix-check-union
...
Fix checking of recursive layouts in the ir-checker
2022-12-28 16:20:01 +01:00
Ayaz
b400851586
Merge branch 'main' into i4717
...
Signed-off-by: Ayaz <20735482+ayazhafiz@users.noreply.github.com>
2022-12-27 18:58:16 -06:00
Joshua Warner
a15e6c5c37
Remove accidentally committed parser generator
2022-12-27 16:55:54 -08:00
Folkert de Vries
1abc6d68a2
Merge pull request #4825 from roc-lang/i4773
...
Handle error types in record/tag extensions when printing errors
2022-12-27 23:13:59 +01:00
Ayaz Hafiz
5b9e3aa856
Handle error types in record/tag extensions when printing errors
2022-12-27 13:20:28 -06:00
Ayaz Hafiz
76d4bea0f3
Require no_check to have an associated annotation
2022-12-27 12:50:53 -06:00
Ayaz Hafiz
09c38798e5
Start checking mono tests that now check correctly
2022-12-27 12:49:30 -06:00