Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tobias Decking
GHC
Commits
74651b6d
Commit
74651b6d
authored
Feb 16, 2000
by
panne
Browse files
[project @ 2000-02-16 12:56:22 by panne]
Fixed pretty printing of RULES
parent
06619533
Changes
1
Show whitespace changes
Inline
Side-by-side
ghc/compiler/hsSyn/HsDecls.lhs
View file @
74651b6d
...
@@ -438,8 +438,9 @@ data RuleBndr name
...
@@ -438,8 +438,9 @@ data RuleBndr name
instance (Outputable name, Outputable pat)
instance (Outputable name, Outputable pat)
=> Outputable (RuleDecl name pat) where
=> Outputable (RuleDecl name pat) where
ppr (RuleDecl name tvs ns lhs rhs loc)
ppr (RuleDecl name tvs ns lhs rhs loc)
= text "RULE" <+> doubleQuotes (ptext name) <> colon <+>
= sep [text "{-# RULES" <+> doubleQuotes (ptext name),
sep [pp_forall, ppr lhs, equals <+> ppr rhs]
pp_forall, ppr lhs, equals <+> ppr rhs,
text "#-}" ]
where
where
pp_forall | null tvs && null ns = empty
pp_forall | null tvs && null ns = empty
| otherwise = text "forall" <+>
| otherwise = text "forall" <+>
...
...
Write
Preview
Supports
Markdown
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