X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcTyDecls.lhs;h=f16d89e77aefa42ddb9110abf6977b398d97a068;hb=0d2346b4f52de431e6274795307759cad47f0ea8;hp=f45af9e5cebd7702c741219d05477d5c19b89c50;hpb=3e0b6b2542d8464bfba365b97a6e4b95c3885f10;p=ghc-hetmet.git diff --git a/compiler/typecheck/TcTyDecls.lhs b/compiler/typecheck/TcTyDecls.lhs index f45af9e..f16d89e 100644 --- a/compiler/typecheck/TcTyDecls.lhs +++ b/compiler/typecheck/TcTyDecls.lhs @@ -22,8 +22,9 @@ import RnHsSyn ( extractHsTyNames ) import Type ( predTypeRep, tcView ) import HscTypes ( TyThing(..), ModDetails(..) ) import TyCon ( TyCon, tyConArity, tyConDataCons, tyConTyVars, - synTyConDefn, isSynTyCon, isAlgTyCon, - tyConName, isNewTyCon, isProductTyCon, newTyConRhs ) + isSynTyCon, isAlgTyCon, + 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