Quick Look does not zonk return types
Test case impredicative/T17332
:
data Dict c where
MkDict :: c => Dict c
aux :: Dict (forall a. a)
aux = MkDict
The constraint c
ends up in the solver as an IrredPred
, which reveals the polytype forall a. a
. But zonking to reveal a polytype should never happen outside of Quick Look, as Note [Quick Look]
in GHC.Tc.Gen.App tells us.
A quick look didn't reveal exactly where to put the zonk, and I don't want to add yet another wrinkle to !4149 (closed). But when this bug is fixed, the ForAllPred
case in canIrred
should never happen.