Note [CoercionHoles and coercion free variables]
Why does a CoercionHole contain a CoVar, as well as reference to fill in? Because we want to treat that CoVar as a free variable of the coercion. See #14584, and Note [What prevents a constraint from floating] in GHC.Tc.Solver, item (4): forall k. [W] co1 :: t1 ~# t2 |> co2 [W] co2 :: k ~# * Here co2 is a CoercionHole. But we /must/ know that it is free in co1, because that's all that stops it floating outside the implication.
References 0
This Note does not link to any other.
Referenced by 5
- GHC.Core.TyCo.FVs call site ×3
- GHC.Core.TyCo.Rep call site
- Coercion holes GHC.Core.TyCo.Rep