X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Ftypes%2FCoercion.lhs;h=ff49a6ef2b3ee5262face93ed9a8838377dcd640;hb=27897431cf24d4bde04b15947440c7205f2d703c;hp=fb91a0de67d9d14d63e8e9d637e903c04e37aaee;hpb=a7a32655a398d0bad611314f0f73c0dcbf2588f4;p=ghc-hetmet.git diff --git a/compiler/types/Coercion.lhs b/compiler/types/Coercion.lhs index fb91a0d..ff49a6e 100644 --- a/compiler/types/Coercion.lhs +++ b/compiler/types/Coercion.lhs @@ -40,7 +40,7 @@ import Type ( Type, Kind, PredType, substTyWith, mkAppTy, mkForAllTy, coreEqType, splitAppTys, isTyVarTy, splitTyConApp_maybe, tyVarsOfType, mkTyVarTys ) -import TyCon ( TyCon, tyConArity, mkCoercionTyCon, isNewTyCon, +import TyCon ( TyCon, tyConArity, mkCoercionTyCon, isClosedNewTyCon, newTyConRhs, newTyConCo, isCoercionTyCon, isCoercionTyCon_maybe ) import Var ( Var, TyVar, isTyVar, tyVarKind ) @@ -451,7 +451,7 @@ splitNewTypeRepCo_maybe :: Type -> Maybe (Type, Coercion) splitNewTypeRepCo_maybe ty | Just ty' <- coreView ty = splitNewTypeRepCo_maybe ty' splitNewTypeRepCo_maybe (TyConApp tc tys) - | isNewTyCon tc + | isClosedNewTyCon tc = ASSERT( tys `lengthIs` tyConArity tc ) -- splitNewTypeRepCo_maybe only be applied -- to *types* (of kind *) case newTyConRhs tc of