Note [The QLInstVar TcLevel]
QuickLook instantiation variables are identified by having a TcLevel of QLInstVar. See Note [Quick Look overview] in GHC.Tc.Gen.App. The QLInstVar level behaves like infinity: it is greater than any other TcLevel. See `strictlyDeeperThan` and friends in this module. That ensures that we never unify an ordinary unification variable with a QL instantiation variable, e.g. alpha[tau:3] := Maybe beta[tau:qlinstvar] (This is an immediate consequence of our general rule that we never unify a variable with a type mentioning deeper variables; the skolem escape check.) QL instantation variables are eventually turned into ordinary unificaiton variables; see (QL3) in Note [Quick Look overview].
References 1
- Quick Look overview GHC.Tc.Gen.App
Referenced by 6
- GHC.Tc.Utils.TcType call site ×3
- QuickLook unification GHC.Tc.Gen.App
- TcLevel invariants GHC.Tc.Utils.TcType
- TcLevel assignment GHC.Tc.Utils.TcType