Commit 839d23a4 authored by simonpj's avatar simonpj
Browse files

[project @ 2005-03-08 09:45:45 by simonpj]

Better printing of types; merge please
parent ceefdee5
...@@ -307,10 +307,13 @@ instance Outputable IfaceTyCon where ...@@ -307,10 +307,13 @@ instance Outputable IfaceTyCon where
------------------- -------------------
pprIfaceContext :: IfaceContext -> SDoc pprIfaceContext :: IfaceContext -> SDoc
-- Prints "(C a, D b) =>", including the arrow -- Prints "(C a, D b) =>", including the arrow
pprIfaceContext [] = empty pprIfaceContext [] = empty
pprIfaceContext theta = parens (sep (punctuate comma (map ppr theta))) pprIfaceContext theta = ppr_preds theta <+> ptext SLIT("=>")
<+> ptext SLIT("=>")
ppr_preds [pred] = ppr pred -- No parens
ppr_preds preds = parens (sep (punctuate comma (map ppr preds)))
-------------------
pabrackets p = ptext SLIT("[:") <> p <> ptext SLIT(":]") pabrackets p = ptext SLIT("[:") <> p <> ptext SLIT(":]")
\end{code} \end{code}
......
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