From: simonpj Date: Tue, 16 Mar 2004 17:32:05 +0000 (+0000) Subject: [project @ 2004-03-16 17:32:05 by simonpj] X-Git-Tag: Initial_conversion_from_CVS_complete~1962 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=5932ca86bc4e13f7491cf9db8baa28884696ff4d;p=ghc-hetmet.git [project @ 2004-03-16 17:32:05 by simonpj] Print slightly more informative types in debug mode --- diff --git a/ghc/compiler/types/TypeRep.lhs b/ghc/compiler/types/TypeRep.lhs index 5b527a0..0e0f88f 100644 --- a/ghc/compiler/types/TypeRep.lhs +++ b/ghc/compiler/types/TypeRep.lhs @@ -37,7 +37,7 @@ import VarSet ( TyVarSet ) import Name ( Name, NamedThing(..), mkWiredInName ) import OccName ( mkOccFS, tcName ) import BasicTypes ( IPName, tupleParens ) -import TyCon ( TyCon, mkFunTyCon, tyConArity, tupleTyConBoxity, isTupleTyCon ) +import TyCon ( TyCon, mkFunTyCon, tyConArity, tupleTyConBoxity, isTupleTyCon, isRecursiveTyCon ) import Class ( Class ) -- others @@ -356,7 +356,10 @@ ppr_type p (NoteTy (SynNote ty1) ty2) = ppr_type p ty1 ppr_type p (NoteTy other ty2) = ppr_type p ty2 ppr_type p (TyConApp tc tys) = ppr_tc_app p tc tys -ppr_type p (NewTcApp tc tys) = ifPprDebug (ptext SLIT("")) <> +ppr_type p (NewTcApp tc tys) = ifPprDebug (if isRecursiveTyCon tc + then ptext SLIT("") + else ptext SLIT("") + ) <> ppr_tc_app p tc tys ppr_type p (AppTy t1 t2) = maybeParen p TyConPrec $