mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 03:42:17 +00:00
![]() 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 |
||
---|---|---|
.. | ||
generated | ||
src | ||
Cargo.toml |