Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
839d23a4
Commit
839d23a4
authored
Mar 08, 2005
by
simonpj
Browse files
[project @ 2005-03-08 09:45:45 by simonpj]
Better printing of types; merge please
parent
ceefdee5
Changes
1
Show whitespace changes
Inline
Side-by-side
ghc/compiler/iface/IfaceType.lhs
View file @
839d23a4
...
@@ -308,9 +308,12 @@ instance Outputable IfaceTyCon where
...
@@ -308,9 +308,12 @@ 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}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment