Commit 21f00c32 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Better pretty-printing of types and coercions

parent b770251e
......@@ -512,9 +512,8 @@ ppr_co p (AppCo co1 co2) = maybeParen p TyConPrec $
ppr_co p co@(ForAllCo {}) = ppr_forall_co p co
ppr_co _ (CoVarCo cv) = parenSymOcc (getOccName cv) (ppr cv)
ppr_co p (AxiomInstCo con index cos)
= angleBrackets (pprPrefixApp p
(ppr (getName con) <> brackets (ppr index))
(map (ppr_co TyConPrec) cos))
= pprPrefixApp p (ppr (getName con) <> brackets (ppr index))
(map (ppr_co TyConPrec) cos)
ppr_co p co@(TransCo {}) = maybeParen p FunPrec $
case trans_co_list co [] of
......
......@@ -730,8 +730,10 @@ pprInfixApp p pp pp_tc ty1 ty2
sep [pp FunPrec ty1, pprInfixVar True pp_tc <+> pp FunPrec ty2]
pprPrefixApp :: Prec -> SDoc -> [SDoc] -> SDoc
pprPrefixApp p pp_fun pp_tys = maybeParen p TyConPrec $
hang pp_fun 2 (sep pp_tys)
pprPrefixApp p pp_fun pp_tys
| null pp_tys = pp_fun
| otherwise = maybeParen p TyConPrec $
hang pp_fun 2 (sep pp_tys)
----------------
pprArrowChain :: Prec -> [SDoc] -> SDoc
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment