[commit: ghc] T8776: Add OutputableBndr instance for OccName (cc4b246)

git at git.haskell.org git at git.haskell.org
Wed Mar 12 12:40:20 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : T8776
Link       : http://ghc.haskell.org/trac/ghc/changeset/cc4b24623e403b81e0a98ce8b4c428558269833f/ghc

>---------------------------------------------------------------

commit cc4b24623e403b81e0a98ce8b4c428558269833f
Author: Dr. ERDI Gergo <gergo at erdi.hu>
Date:   Wed Mar 12 20:37:22 2014 +0800

    Add OutputableBndr instance for OccName


>---------------------------------------------------------------

cc4b24623e403b81e0a98ce8b4c428558269833f
 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