X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcTyDecls.lhs;h=f16d89e77aefa42ddb9110abf6977b398d97a068;hp=86d4a2b830d698d2a45577981ca2f2463d5d6b82;hb=d5c4754dcb857be7b9f4dbf6482e6050a9cd0991;hpb=b5d068a262d7afe153c12ed593cb8bbb39abe932 diff --git a/compiler/typecheck/TcTyDecls.lhs b/compiler/typecheck/TcTyDecls.lhs index 86d4a2b..f16d89e 100644 --- a/compiler/typecheck/TcTyDecls.lhs +++ b/compiler/typecheck/TcTyDecls.lhs @@ -23,7 +23,8 @@ import Type ( predTypeRep, tcView ) import HscTypes ( TyThing(..), ModDetails(..) ) import TyCon ( TyCon, tyConArity, tyConDataCons, tyConTyVars, isSynTyCon, isAlgTyCon, - tyConName, isNewTyCon, isProductTyCon, newTyConRhs ) + tyConName, isNewTyCon, isProductTyCon, newTyConRhs, + isOpenTyCon ) import Class ( classTyCon ) import DataCon ( dataConOrigArgTys ) import Var ( TyVar ) @@ -238,7 +239,8 @@ calcRecFlags boot_details tyclss -- rather less nice, so I'm not going to do that yet. --------------- Newtypes ---------------------- - new_tycons = filter isNewTyCon all_tycons + new_tycons = filter isNewTyConAndNotOpen all_tycons + isNewTyConAndNotOpen tycon = isNewTyCon tycon && not (isOpenTyCon tycon) nt_loop_breakers = mkNameSet (findLoopBreakers nt_edges) is_rec_nt tc = tyConName tc `elemNameSet` nt_loop_breakers -- is_rec_nt is a locally-used helper function