Commit graph

176 commits

Author SHA1 Message Date
Ayaz Hafiz
d8a8dff70d
Treat unwrapped capture sets as unwrapped directly 2022-08-19 22:16:41 -05:00
Ayaz Hafiz
68bb03ec09
Update mono tests 2022-08-19 22:16:41 -05:00
Ayaz Hafiz
fc4979e2ce
Add ClosureCallOptions enum to describe how to switch calling lambda 2022-08-19 22:16:40 -05:00
Richard Feldman
58c3575e44
Fix mono tests 2022-08-12 15:28:05 -04:00
Folkert
792936066c
Merge remote-tracking branch 'origin/trunk' into roc-std-platform 2022-08-07 13:28:03 +02:00
Richard Feldman
b0f7737227
Update mono tests 2022-08-03 22:45:38 -04:00
Ayaz Hafiz
fc9ff928eb
Choose non-recursion var when merging arbitrary variables, when possible.
Closes #3669
2022-08-02 08:15:54 -05:00
Ayaz Hafiz
1460f60ab1
Unify material recursion variables behind aliases and opaques
Even if there are no changes to alias arguments, and no new variables were
introduced, we may still need to unify the "actual types" of the alias or opaque!

The unification is not necessary from a types perspective (and in fact, we may want
to disable it for `roc check` later on), but it is necessary for the monomorphizer,
which expects identical types to be reflected in the same variable.

As a concrete example, consider the unification of two opaques

  P := [Zero, Succ P]

  (@P (Succ n)) ~ (@P (Succ o))

`P` has no arguments, and unification of the surface of `P` introduces nothing new.
But if we do not unify the types of `n` and `o`, which are recursion variables, they
will remain disjoint! Currently, the implication of this is that they will be seen
to have separate recursive memory layouts in the monomorphizer - which is no good
for our compilation model.

Closes #3653
2022-07-29 11:03:47 -04:00
Ayaz Hafiz
5df1dfae6f
Update mono tests 2022-07-25 11:44:48 -04:00
Ayaz Hafiz
5988257bde
Reflect newtypes in path instructions 2022-07-21 18:17:57 -04:00
Ayaz Hafiz
1acb7e0748
Don't add path instructions for newtypes that decay into their args 2022-07-21 14:57:17 -04:00
Ayaz Hafiz
0b74620a8f
Update mono tests 2022-07-18 22:15:22 -04:00
Ayaz Hafiz
17f53a23a5
Update tests 2022-07-18 17:55:02 -04:00
Ayaz Hafiz
9a66e936a8
Switch String deriving to be an immediate deriver 2022-07-15 10:39:08 -04:00
Folkert de Vries
460b822caa
Merge pull request #3501 from rtfeldman/derive-tag-union-encoding-gen
Derive tag union encoding gen
2022-07-15 15:57:41 +02:00
Folkert de Vries
1b1b63aad0
Merge branch 'trunk' into assoc-list-dict 2022-07-14 16:47:50 +02:00
Ayaz Hafiz
94ab904b6f
Fix compile errors 2022-07-14 09:02:37 -04:00
Ayaz Hafiz
2ca86c84dc
Gen derived tag encoders with multiple payloads 2022-07-14 08:49:46 -04:00
Ayaz Hafiz
1cf1e114be
Derive tag union encoders 2022-07-14 08:49:45 -04:00
Ayaz Hafiz
9aa3cb8d33
Use Derived_synth for synthesizing implementations, and Derived_gen for codegen 2022-07-14 08:49:45 -04:00
Ayaz Hafiz
8311fb553f
Update mono tests 2022-07-14 08:49:45 -04:00
Ayaz
a9243720da
Merge pull request #3496 from rtfeldman/derive-w-mono
Monomorphize and compile derived implementations
2022-07-14 07:45:21 -05:00
Folkert
5763248b44
Merge remote-tracking branch 'origin/trunk' into assoc-list-dict 2022-07-13 20:44:28 +02:00
Folkert
7456be1771
update mono tests 2022-07-13 19:39:03 +02:00
Richard Feldman
2efb605d68
Update mono tests 2022-07-13 12:20:16 -04:00
Ayaz Hafiz
df9bcb1a0c
Use Derived_synth for synthesizing implementations, and Derived_gen for codegen 2022-07-13 08:47:39 -04:00
Ayaz Hafiz
91e3bfbd01
Fix tests 2022-07-13 08:47:38 -04:00
Ayaz Hafiz
9826253785
Deriving string encoders works 2022-07-13 08:47:37 -04:00
Ayaz Hafiz
94142bf474
Remove compiler-file/line-dependent runtime error messages
This will help avoid the diff changes we've been running into often when
changes to mono line numbers change test results.
2022-07-12 15:17:19 -04:00
Folkert
1863bcbd8c
stop using line numbers in unresolved type var messages 2022-07-10 22:17:35 +02:00
Folkert
2163147e42
update mono tests 2022-07-10 11:58:32 +02:00
Folkert de Vries
7a2c2f6d1d
Merge pull request #3460 from rtfeldman/i3456
Correctly compile polymorphic recursive tag unions
2022-07-09 12:44:21 +02:00
Ayaz Hafiz
532b2ff403
Support specialization of naked tag unions at toplevel 2022-07-08 17:50:52 -04:00
Ayaz Hafiz
808d19b01b
Correctly compile unified recursive tag unions 2022-07-08 17:35:14 -04:00
Folkert
02fa2eb086
update mono tests 2022-07-08 22:14:16 +02:00
Folkert
c0ace1ee0b
update mono tests 2022-07-08 16:19:12 +02:00
Folkert
24c6b92846
update mono tests 2022-07-08 16:16:42 +02:00
Folkert
6dc0a379b0
update mono tests 2022-07-08 15:39:23 +02:00
Folkert
e6977986c9
update mono tests 2022-07-08 02:57:00 +02:00
Ayaz
22f02984d3
Merge branch 'trunk' into 3378 2022-07-06 20:37:32 -05:00
Ayaz Hafiz
8d2d0b02db
Fix mono tests 2022-07-06 12:57:58 -04:00
ayazhafiz
b6ebb960c9
Update mono tests 2022-07-06 12:49:03 -04:00
ayazhafiz
41e63c8576
Add missing mono test 2022-07-06 12:49:02 -04:00
ayazhafiz
937b73b797
Compile lambdas that have an empty lambda set
Closes #3224

This should also fix a number of other issues often observed when a
lambda is never actually called, but we fail to codegen because it has
an empty lambda set.
2022-07-06 12:49:01 -04:00
Ayaz Hafiz
f940cc18c1
Consolidate calling specialized proc 2022-07-06 09:12:02 -04:00
Ayaz Hafiz
b868e0e469
Handle recursive calls to capturing function 2022-07-06 09:10:31 -04:00
Ayaz Hafiz
ba450367ca
Choose i128/u128 num layouts when necessary 2022-07-05 22:16:52 -04:00
Ayaz Hafiz
f31f78fde1
Add test for when U64 num literal layout should be chosen 2022-07-05 22:16:52 -04:00
Folkert de Vries
93dbda9ac5
Merge pull request #3399 from rtfeldman/pure-roc-map-with-index
Pure Roc `List.mapWithIndex`
2022-07-06 00:25:46 +02:00
Folkert
36c8723214
update mono tests 2022-07-05 00:52:10 +02:00