projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add pretty-printing of <[...]>@.. types
[ghc-hetmet.git]
/
compiler
/
types
/
TypeRep.lhs
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
| 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)))
| 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
| otherwise
= pprTypeNameApp p pp (getName tc) tys