summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/T19142.hs
Commit message (Collapse)AuthorAgeFilesLines
* Fix error recovery in solveEqualitiesSimon Peyton Jones2021-01-221-0/+20
As #19142 showed, with -fdefer-type-errors we were allowing compilation to proceed despite a fatal kind error. This patch fixes it, as described in the new note in GHC.Tc.Solver, Note [Wrapping failing kind equalities] Also fixes #19158 Also when checking default( ty1, ty2, ... ) only consider a possible default (C ty2) if ty2 is kind-compatible with C. Previously we could form kind-incompatible constraints, with who knows what kind of chaos resulting. (Actually, no chaos results, but that's only by accident. It's plain wrong to form the constraint (Num Either) for example.) I just happened to notice this during fixing #19142.