[commit: ghc] ghc-7.10: Add pprRuleName (aaa1ea8)

git at git.haskell.org git at git.haskell.org
Tue Sep 29 16:09:17 UTC 2015


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

On branch  : ghc-7.10
Link       : http://ghc.haskell.org/trac/ghc/changeset/aaa1ea838c8b4edc406a30a04d58cdcec4fda799/ghc

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

commit aaa1ea838c8b4edc406a30a04d58cdcec4fda799
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Thu Sep 24 01:17:27 2015 +0200

    Add pprRuleName


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

aaa1ea838c8b4edc406a30a04d58cdcec4fda799
 compiler/basicTypes/BasicTypes.hs | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/compiler/basicTypes/BasicTypes.hs b/compiler/basicTypes/BasicTypes.hs
index ee34b21..cf1c6d1 100644
--- a/compiler/basicTypes/BasicTypes.hs
+++ b/compiler/basicTypes/BasicTypes.hs
@@ -37,7 +37,7 @@ module BasicTypes(
         RecFlag(..), isRec, isNonRec, boolToRecFlag,
         Origin(..), isGenerated,
 
-        RuleName,
+        RuleName, pprRuleName,
 
         TopLevelFlag(..), isTopLevel, isNotTopLevel,
 
@@ -283,6 +283,9 @@ instance Outputable WarningTxt where
 
 type RuleName = FastString
 
+pprRuleName :: RuleName -> SDoc
+pprRuleName rn = doubleQuotes (ftext rn)
+
 {-
 ************************************************************************
 *                                                                      *



More information about the ghc-commits mailing list