[commit: ghc] master: Add OutputableBndr instance for OccName (4d1b7b4)
git at git.haskell.org
git at git.haskell.org
Thu Mar 13 13:21:42 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/4d1b7b4a9b986e87755784478b4ea4883a5e203e/ghc
>---------------------------------------------------------------
commit 4d1b7b4a9b986e87755784478b4ea4883a5e203e
Author: Dr. ERDI Gergo <gergo at erdi.hu>
Date: Wed Mar 12 20:37:22 2014 +0800
Add OutputableBndr instance for OccName
>---------------------------------------------------------------
4d1b7b4a9b986e87755784478b4ea4883a5e203e
compiler/basicTypes/OccName.lhs | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/compiler/basicTypes/OccName.lhs b/compiler/basicTypes/OccName.lhs
index e993767..2d17b95 100644
--- a/compiler/basicTypes/OccName.lhs
+++ b/compiler/basicTypes/OccName.lhs
@@ -261,6 +261,11 @@ instance Data OccName where
instance Outputable OccName where
ppr = pprOccName
+instance OutputableBndr OccName where
+ pprBndr _ = ppr
+ pprInfixOcc n = pprInfixVar (isSymOcc n) (ppr n)
+ pprPrefixOcc n = pprPrefixVar (isSymOcc n) (ppr n)
+
pprOccName :: OccName -> SDoc
pprOccName (OccName sp occ)
= getPprStyle $ \ sty ->
More information about the ghc-commits
mailing list