X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=compiler%2FcoreSyn%2FMkExternalCore.lhs;h=e5f81d0a54a65e0f9b00d5226bf91b92e88175d2;hb=7434f457d2280cef5da0e641ab7290e510681b7d;hp=a0bccda29e19b21bc3c61a73aa0003894de88da9;hpb=7fc749a43b4b6b85d234fa95d4928648259584f4;p=ghc-hetmet.git diff --git a/compiler/coreSyn/MkExternalCore.lhs b/compiler/coreSyn/MkExternalCore.lhs index a0bccda..e5f81d0 100644 --- a/compiler/coreSyn/MkExternalCore.lhs +++ b/compiler/coreSyn/MkExternalCore.lhs @@ -69,13 +69,11 @@ collect_tdefs tcon tdefs where tdef | isNewTyCon tcon = C.Newtype (make_con_qid (tyConName tcon)) (map make_tbind tyvars) repclause --- 20060420 GHC handles empty data types just fine. ExtCore should too! jds --- | 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 || isOpenTyCon tcon= Nothing - | otherwise = Just (make_ty rep) - where (_, rep) = newTyConRep tcon + | otherwise = Just (make_ty (repType rhs)) + where (_, rhs) = newTyConRhs tcon tyvars = tyConTyVars tcon collect_tdefs _ tdefs = tdefs