Commit graph

1741 commits

Author SHA1 Message Date
Folkert
a3b00fbf55
Merge branch 'explicit-closed-tag-record' into delay-instantiating-aliases 2022-03-17 20:34:52 +01:00
Folkert
7d8409f6a6
write Aliases implementation 2022-03-15 22:02:04 +01:00
ayazhafiz
73396c0607 aliases->references in partial procs 2022-03-15 11:05:59 -05:00
ayazhafiz
93804bb04c Unnecessary let binding 2022-03-14 17:44:07 -05:00
ayazhafiz
17029cff7e Link aliased lambdas to the partial procs of the original symbol
This ensures that we use the correct specialized variable at the call
site of a function. In #2725 what happened was that a generalized
function was aliased, causing it to undergo generalization again. Then,
we lost the variable used to specialize at the call site. Instead, just
link to the partial proc being aliased directly.

There is an added benefit here, which is that we can avoid the
possibly-quadratic replacement of symbols in the generated statement.

Closes #2725
2022-03-14 16:42:53 -05:00
ayazhafiz
2d01c21b5c Codegen tags that are polymorphic because of rigids
Closes #2724
2022-03-14 15:25:25 -05:00
Folkert de Vries
59378d35c6
Update compiler/mono/src/borrow.rs
Co-authored-by: hafiz <20735482+ayazhafiz@users.noreply.github.com>
2022-03-09 15:08:13 +01:00
Folkert
6543c9bbc6
Merge remote-tracking branch 'origin/trunk' into box-all-the-things 2022-03-09 00:00:15 +01:00
Folkert
a3d56bce3a
layout of Box a 2022-03-08 22:21:25 +01:00
Folkert
f2b8c89878
clippy 2022-03-08 22:21:13 +01:00
Folkert
92f2927046
initial implementation 2022-03-08 19:09:42 +01:00
Derek Gustafson
c65e3d2bae
Fix how dec is formatted in mono ir. 2022-03-07 16:17:59 -05:00
Derek Gustafson
ba6b225761
Hide RocDec implemntation details. 2022-03-07 15:34:02 -05:00
Folkert
b3b3b8790c
add new Expr variants 2022-03-07 21:13:48 +01:00
Folkert
3510bad1d5
add scaffolding 2022-03-07 20:55:40 +01:00
Folkert
ba2f9ba779
Merge remote-tracking branch 'origin/trunk' into content-flattype-copy 2022-03-06 20:52:04 +01:00
Folkert
a9c8e2dc3e
copy instead of clone Content 2022-03-06 19:07:18 +01:00
hafiz
de9da2d8a5
Merge pull request #2657 from rtfeldman/i/2567
Register accessor closures when they are bound
2022-03-06 12:59:55 -05:00
ayazhafiz
cc8c945762 Remove stray dbg 2022-03-06 11:16:03 -05:00
ayazhafiz
0692caf7ba Consolidate Accessor data 2022-03-06 11:07:31 -05:00
ayazhafiz
3bff99b0a2 Register accessor closures when they are bound
Previously we only registered record accessor closures in anonymous
contexts, where we assume they must already be specialized based on the
surrounding contexts. This is not true in general since one might bind
an accessor to a name.

Closes #2567
2022-03-06 10:53:12 -05:00
ayazhafiz
81481e2599 Report non-exhaustive patterns with guards 2022-03-05 13:30:02 -05:00
Richard Feldman
c89a6c109a
Merge pull request #2627 from rtfeldman/constraints-soa
Constraints using Struct of Arrays
2022-03-04 19:39:03 -05:00
Brian Carroll
f2adf71873 Move alias analysis to its own crate instead of roc_mono
Shrinks roc_repl_wasm by 400kB (~8%)
2022-03-04 14:50:02 +00:00
Folkert
2598e8fe8c
Merge remote-tracking branch 'origin/trunk' into constraints-soa 2022-03-02 19:10:58 +01:00
Folkert
ec099bbdec
WIP 2022-03-02 14:46:30 +01:00
Brendan Hansknecht
0ae0e689fc
Merge pull request #2602 from rtfeldman/list-replace
List replace
2022-03-01 23:29:32 +00:00
ayazhafiz
a62fd31ab6 Fix new clippy warnings 2022-02-27 20:41:07 -05:00
ayazhafiz
27a50a3e6b exhaustive_wrap -> exhaustive 2022-02-27 20:30:13 -05:00
ayazhafiz
b9a29bdb16 Make exhaustive checking its own crate
Prepares for moving exhaustiveness checking to the closer typechecking
phase. Doing this one step at a time so that git preserves the rename.
2022-02-27 20:28:25 -05:00
Brendan Hansknecht
457ba524aa fix tests and alias analysis 2022-02-27 15:20:54 -08:00
Brendan Hansknecht
2e70bb8458 remove list set low level 2022-02-27 15:07:09 -08:00
Brian Carroll
dcf3c052af
Merge pull request #2594 from rtfeldman/wasm-repl-fixes
Wasm REPL bug fixes
2022-02-27 18:40:47 +00:00
Brendan Hansknecht
b802d681a3 Merge remote-tracking branch 'origin/trunk' into list-replace 2022-02-27 00:28:08 -08:00
ayazhafiz
a7825c34f5 fixup! Exhaustiveness checking opaque patterns 2022-02-27 00:13:27 -05:00
ayazhafiz
4e27cdd21d Compile opaque patterns all the way, and add repl test 2022-02-27 00:11:10 -05:00
ayazhafiz
68d28349ed Exhaustiveness checking opaque patterns 2022-02-27 00:10:12 -05:00
ayazhafiz
9d87c605fe Couple of opaque repl tests 2022-02-27 00:10:12 -05:00
ayazhafiz
059c324268 Error reporting for type mismatches involving opaques 2022-02-27 00:10:12 -05:00
Richard Feldman
d3acf34415
Merge pull request #1591 from rtfeldman/single-quote-literal
Single Quote literal
2022-02-26 23:27:46 -05:00
Brian Carroll
9544b3ba6c repl_wasm: update static assertions for struct sizes 2022-02-26 13:11:17 +00:00
Richard Feldman
d57334dd63
Merge pull request #2566 from rtfeldman/gui-example
GUI Example
2022-02-26 07:48:38 -05:00
Brendan Hansknecht
39d070e543 flip platform flag to be default 2022-02-25 20:10:36 -08:00
Brendan Hansknecht
cd0d89fdc9 Merge remote-tracking branch 'origin/trunk' into single-quote-literal 2022-02-25 07:39:58 -08:00
Brendan Hansknecht
7c6c9b52a9 Merge remote-tracking branch 'origin/trunk' into list-replace 2022-02-25 07:35:00 -08:00
Richard Feldman
a49b66e379
Merge branch 'trunk' into gui-example 2022-02-25 08:22:36 -05:00
Brendan Hansknecht
dddf8ff785 switch from pair to record and change name to ListReplaceUnsafe 2022-02-24 20:41:26 -08:00
Brendan Hansknecht
ba2e8cd32b Add base piping for list.Replace 2022-02-24 17:58:56 -08:00
Brendan Hansknecht
69b4e78ac7 Add --opt-size and compiling smaller binaries 2022-02-24 15:39:50 -08:00
Brendan Hansknecht
f7c0e2ef19 Merge remote-tracking branch 'origin/trunk' into single-quote-literal 2022-02-24 10:13:39 -08:00