X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FcoreSyn%2FMkExternalCore.lhs;h=246bfa05c74768b963286fc7166798b27c82b985;hb=bf40e268d916947786c56ec38db86190854a2d2c;hp=818175478f7c4807cca8c322979404df5607f36e;hpb=c94408e522e5af3b79a5beadc7e6d15cee553ee7;p=ghc-hetmet.git diff --git a/compiler/coreSyn/MkExternalCore.lhs b/compiler/coreSyn/MkExternalCore.lhs index 8181754..246bfa0 100644 --- a/compiler/coreSyn/MkExternalCore.lhs +++ b/compiler/coreSyn/MkExternalCore.lhs @@ -69,7 +69,7 @@ collect_tdefs tcon tdefs -- | null (tyConDataCons tcon) = error "MkExternalCore died: can't handle datatype declarations with no data constructors" | otherwise = C.Data (make_con_qid (tyConName tcon)) (map make_tbind tyvars) (map make_cdef (tyConDataCons tcon)) - where repclause | isRecursiveTyCon tcon = Nothing + where repclause | isRecursiveTyCon tcon || isOpenTyCon tcon= Nothing | otherwise = Just (make_ty rep) where (_, rep) = newTyConRep tcon tyvars = tyConTyVars tcon @@ -175,6 +175,7 @@ make_ty (NoteTy _ t) = make_ty t make_kind :: Kind -> C.Kind +make_kind (PredTy p) | isEqPred p = panic "coercion kinds in external core not implemented!" make_kind (FunTy k1 k2) = C.Karrow (make_kind k1) (make_kind k2) make_kind k | isLiftedTypeKind k = C.Klifted