From f22c873e99d5b371a03d249febb89195a4fda2fc Mon Sep 17 00:00:00 2001 From: Adam Megacz Date: Wed, 31 Aug 2011 16:56:45 -0700 Subject: [PATCH] add pretty-printing of <[...]>@.. types --- compiler/types/TypeRep.lhs | 5 +++++ 1 file changed, 5 insertions(+) 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 -- 1.7.10.4