From: Adam Megacz Date: Wed, 31 Aug 2011 23:56:45 +0000 (-0700) Subject: add pretty-printing of <[...]>@.. types X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=f22c873e99d5b371a03d249febb89195a4fda2fc;hp=9d8fab50565767106d4ca9bf54ca3e7c04ee0a35 add pretty-printing of <[...]>@.. types --- diff --git a/compiler/types/TypeRep.lhs b/compiler/types/TypeRep.lhs index db41403..4f0e9d8 100644 --- a/compiler/types/TypeRep.lhs +++ b/compiler/types/TypeRep.lhs @@ -648,8 +648,13 @@ pprTcApp _ pp tc [ty] | tc `hasKey` argTypeKindTyConKey = ptext (sLit "??") pprTcApp p pp tc tys + | isTupleTyCon tc && tyConArity tc == length tys = tupleParens (tupleTyConBoxity tc) (sep (punctuate comma (map (pp TopPrec) tys))) + + | tc `hasKey` hetMetCodeTypeTyConKey, [ty1,ty2] <- tys + = ptext (sLit "<[") <> pp TopPrec ty2 <> ptext (sLit "]>@") <> pp TopPrec ty1 + | otherwise = pprTypeNameApp p pp (getName tc) tys