From: simonpj Date: Tue, 8 Mar 2005 09:45:45 +0000 (+0000) Subject: [project @ 2005-03-08 09:45:45 by simonpj] X-Git-Tag: Initial_conversion_from_CVS_complete~954 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=839d23a4ddbb27409eebc8c1f33a04ab4a0f1654 [project @ 2005-03-08 09:45:45 by simonpj] Better printing of types; merge please --- diff --git a/ghc/compiler/iface/IfaceType.lhs b/ghc/compiler/iface/IfaceType.lhs index f893a58..9853a04 100644 --- a/ghc/compiler/iface/IfaceType.lhs +++ b/ghc/compiler/iface/IfaceType.lhs @@ -307,10 +307,13 @@ instance Outputable IfaceTyCon where ------------------- pprIfaceContext :: IfaceContext -> SDoc -- Prints "(C a, D b) =>", including the arrow -pprIfaceContext [] = empty -pprIfaceContext theta = parens (sep (punctuate comma (map ppr theta))) - <+> ptext SLIT("=>") - +pprIfaceContext [] = empty +pprIfaceContext theta = ppr_preds theta <+> 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(":]") \end{code}