| isSymOcc (getOccName tv) = parens (ppr tv)
| otherwise = ppr tv
+-------------------
pprForAll :: [TyVar] -> SDoc
pprForAll [] = empty
pprForAll tvs = ptext (sLit "forall") <+> sep (map pprTvBndr tvs) <> dot
pprTvBndr :: TyVar -> SDoc
-pprTvBndr tv
+pprTvBndr tv
| isLiftedTypeKind kind = ppr_tvar tv
- | otherwise = parens (ppr_tvar tv <+> dcolon <+> pprKind kind)
- where
- kind = tyVarKind tv
+ | otherwise = parens (ppr_tvar tv <+> dcolon <+> pprKind kind)
+ where
+ kind = tyVarKind tv
\end{code}
Note [Infix type variables]
| 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` hetMetKappaTyConKey, [ty1,ty2] <- tys
+ = pp TopPrec ty1 <> ptext (sLit "~~>") <> pp TopPrec ty2
+
+ | tc `hasKey` hetMetCodeTypeTyConKey, [ty1,ty2] <- tys
+ = ptext (sLit "<[") <> pp TopPrec ty2 <> ptext (sLit "]>@") <> pp TopPrec ty1
+
| otherwise
= pprTypeNameApp p pp (getName tc) tys