Skip to content

Draft: Fix an awkward error in Visible Type Application

Simon Peyton Jones requested to merge wip/T19482 into master

This error, shown up by #19482 (closed), happens if a visible type argument is ill-kinded. Then we failed in the monad, but that led to an insoluble constraint (the error) that was not properly wrapped in implications that bind its enclosing skolems. Alas.

The fix is a bit clumsy, but it works. Note [VTA error recovery] explains.

I also fixed a buglet in GHC.Tc.Solver.Interact.findMatchingIrreds, where there was a missing kind check. Somehow this bug has never manifested before, but it was tickled by an existing test case, after the enhanced error recovery in this patch.

Edited by Andreas Klebinger

Merge request reports