Indexed newtypes
[ghc-hetmet.git] / compiler / coreSyn / MkExternalCore.lhs
index e7d79e6..246bfa0 100644 (file)
@@ -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