Note [Instantiate sig with fresh variables]
It's vital to instantiate a type signature with fresh variables.
For example:
type T = forall a. [a] -> [a]
f :: T;
f = g where { g :: T; g = <rhs> }
We must not use the same 'a' from the defn of T at both places!!
(Instantiation is only necessary because of type synonyms. Otherwise,
it's all cool; each signature has distinct type variables from the renamer.) References 0
This Note does not link to any other.
Referenced by 1
- Skolemisation overview GHC.Tc.Utils.Unify