X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Ftypes%2FTypeRep.lhs;h=c694dc8b79ef74babcf2da6af4413543f00e1255;hp=1b2f56d5bd3293cc41dbaec9fd09bd1d5f9f32e3;hb=deda0c55629600e886f47a5e90bad67953df1ad8;hpb=4d60ffc3e9a167c64e395046e1d2ef51eeb165ec;ds=sidebyside diff --git a/compiler/types/TypeRep.lhs b/compiler/types/TypeRep.lhs index 1b2f56d..c694dc8 100644 --- a/compiler/types/TypeRep.lhs +++ b/compiler/types/TypeRep.lhs @@ -23,7 +23,7 @@ module TypeRep ( -- Pretty-printing pprType, pprParendType, pprTypeApp, - pprTyThingCategory, + pprTyThing, pprTyThingCategory, pprPred, pprTheta, pprForAll, pprThetaArrow, pprClassPred, -- Kinds @@ -292,8 +292,11 @@ data TyThing = AnId Id | ATyCon TyCon | AClass Class -instance Outputable TyThing where - ppr thing = pprTyThingCategory thing <+> quotes (ppr (getName thing)) +instance Outputable TyThing where + ppr = pprTyThing + +pprTyThing :: TyThing -> SDoc +pprTyThing thing = pprTyThingCategory thing <+> quotes (ppr (getName thing)) pprTyThingCategory :: TyThing -> SDoc pprTyThingCategory (ATyCon _) = ptext SLIT("Type constructor")