mirror of
https://github.com/roc-lang/roc.git
synced 2024-09-22 00:09:33 +03:00
b824302ab3
Prior to this patch we would not explicitly name solved type variables, causing the elaborated type to appear unconstrained even when the internal representation was constrained. For example, given a definition like ``` \a, b -> Pair a b ``` we would generate distinct, fresh type variables for `a` and `b` but not name them after solution. So even though the compiler knows they are distinct, printing to the surface syntax would emit ``` *, * -> [ Pair * * ]* ``` which is incorrect, as the result type is constrained on the input type. Instead, we now properly emit ``` a, b -> [ Pair a b ]* ``` naming variables where dependencies do exist. Where type variables are don't constrain anything else, we can and do continue to emit the wildcard type. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |