X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcCanonical.lhs;h=415365f91f700aa570d18bbd316a9312f5599445;hp=e0c85202b90b90c8deff4070617ceae27f001608;hb=af2e0d24abe49e06fdee4a95530af8a5c33da4a3;hpb=463e89085872d0cde8c3c1610860a3013ad07900 diff --git a/compiler/typecheck/TcCanonical.lhs b/compiler/typecheck/TcCanonical.lhs index e0c8520..415365f 100644 --- a/compiler/typecheck/TcCanonical.lhs +++ b/compiler/typecheck/TcCanonical.lhs @@ -527,7 +527,8 @@ canEqLeafOriented :: CtFlavor -> CoVar -- First argument is not OtherCls canEqLeafOriented fl cv cls1@(FunCls fn tys) s2 | not (kindAppResult (tyConKind fn) tys `eqKind` typeKind s2 ) - = kindErrorTcS fl (unClassify cls1) s2 + = do { kindErrorTcS fl (unClassify cls1) s2 + ; return emptyCCan } | otherwise = ASSERT2( isSynFamilyTyCon fn, ppr (unClassify cls1) ) do { (xis1,ccs1) <- flattenMany fl tys -- flatten type function arguments @@ -544,7 +545,8 @@ canEqLeafOriented fl cv cls1@(FunCls fn tys) s2 canEqLeafOriented fl cv (VarCls tv) s2 | not (k1 `eqKind` k2 || (isMetaTyVar tv && k2 `isSubKind` k1)) -- Establish the kind invariant for CTyEqCan - = kindErrorTcS fl (mkTyVarTy tv) s2 + = do { kindErrorTcS fl (mkTyVarTy tv) s2 + ; return emptyCCan } | otherwise = do { (xi2,ccs2) <- flatten fl s2 -- flatten RHS