projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
9d8fab5
)
add pretty-printing of <[...]>@.. types
author
Adam Megacz
<megacz@cs.berkeley.edu>
Wed, 31 Aug 2011 23:56:45 +0000
(16:56 -0700)
committer
Adam Megacz
<megacz@cs.berkeley.edu>
Wed, 31 Aug 2011 23:56:45 +0000
(16:56 -0700)
compiler/types/TypeRep.lhs
patch
|
blob
|
history
diff --git
a/compiler/types/TypeRep.lhs
b/compiler/types/TypeRep.lhs
index
db41403
..
4f0e9d8
100644
(file)
--- 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