Wrap an implication around class-sig kind errors
Ticket #17841 showed that we can get a kind error in a class signature, but lack an enclosing implication that binds its skolems. This patch * Adds the wrapping implication: the new call to checkTvConstraints in tcClassDecl1 * Simplifies the API to checkTvConstraints, which was not otherwise called at all. * Simplifies TcErrors.report_unsolved by *not* initialising the TidyEnv from the typechecker lexical envt. It's enough to do so from the free vars of the unsolved constraints; and we get silly renamings if we add variables twice: once from the lexical scope and once from the implication constraint.
Showing
- compiler/typecheck/TcErrors.hs 1 addition, 2 deletionscompiler/typecheck/TcErrors.hs
- compiler/typecheck/TcEvidence.hs 1 addition, 2 deletionscompiler/typecheck/TcEvidence.hs
- compiler/typecheck/TcTyClsDecls.hs 5 additions, 1 deletioncompiler/typecheck/TcTyClsDecls.hs
- compiler/typecheck/TcUnify.hs 8 additions, 12 deletionscompiler/typecheck/TcUnify.hs
- testsuite/tests/polykinds/T16902.stderr 1 addition, 1 deletiontestsuite/tests/polykinds/T16902.stderr
- testsuite/tests/polykinds/T17841.hs 7 additions, 0 deletionstestsuite/tests/polykinds/T17841.hs
- testsuite/tests/polykinds/T17841.stderr 13 additions, 0 deletionstestsuite/tests/polykinds/T17841.stderr
- testsuite/tests/polykinds/all.T 1 addition, 0 deletionstestsuite/tests/polykinds/all.T
Loading
Please register or sign in to comment