X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcTyDecls.lhs;h=f16d89e77aefa42ddb9110abf6977b398d97a068;hb=1a0edd6c064a24042fa20c7014d11716a2d90a60;hp=86d4a2b830d698d2a45577981ca2f2463d5d6b82;hpb=e8a591c1a3dbdeccec2dd2aacccd7435004b0d51;p=ghc-hetmet.git 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