add pretty-printing of <[...]>@.. types
authorAdam Megacz <megacz@cs.berkeley.edu>
Wed, 31 Aug 2011 23:56:45 +0000 (16:56 -0700)
committerAdam Megacz <megacz@cs.berkeley.edu>
Wed, 31 Aug 2011 23:56:45 +0000 (16:56 -0700)
compiler/types/TypeRep.lhs

index db41403..4f0e9d8 100644 (file)
@@ -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