X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Ftypes%2FKind.lhs;fp=compiler%2Ftypes%2FKind.lhs;h=0594f7f53af2a254e1e8c9e137552ca849d574ae;hp=23787d20e2bd81674f5e9f335608a7795323ae36;hb=3afdf90d0f9fb18f13a6b76fe41e5fc60bbdaac3;hpb=80f5e7009434750cee746bd89f7eea5f7c7fa3fd diff --git a/compiler/types/Kind.lhs b/compiler/types/Kind.lhs index 23787d2..0594f7f 100644 --- a/compiler/types/Kind.lhs +++ b/compiler/types/Kind.lhs @@ -72,8 +72,11 @@ isLiftedTypeKindCon tc = tc `hasKey` liftedTypeKindTyConKey \begin{code} typeKind :: Type -> Kind -typeKind (TyConApp tc tys) - = kindAppResult (tyConKind tc) tys +typeKind _ty@(TyConApp tc tys) + = ASSERT2( not (tc `hasKey` eqPredPrimTyConKey) || length tys == 2, ppr _ty ) + -- Assertion checks for unsaturated application of (~) + -- See Note [The (~) TyCon] in TysPrim + kindAppResult (tyConKind tc) tys typeKind (PredTy pred) = predKind pred typeKind (AppTy fun _) = kindFunResult (typeKind fun)