Commit graph

11 commits

Author SHA1 Message Date
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
Richard Feldman
b0f7737227
Update mono tests 2022-08-03 22:45:38 -04: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
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
Ayaz Hafiz
94ab904b6f
Fix compile errors 2022-07-14 09:02:37 -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