[commit: ghc] master: Export dopt_set, dopt_unset (175b124)

Ian Lynagh igloo at earth.li
Sun Mar 3 19:31:48 CET 2013


Repository : http://darcs.haskell.org/ghc.git/

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/175b12411c0d571bd5d5594db7de5e4686099953

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

commit 175b12411c0d571bd5d5594db7de5e4686099953
Author: Ian Lynagh <ian at well-typed.com>
Date:   Sun Mar 3 17:35:02 2013 +0000

    Export dopt_set, dopt_unset
    
    We don't need them, but GHC API users might.

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

 compiler/main/DynFlags.hs | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index 3591a30..479516d 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -25,7 +25,7 @@ module DynFlags (
         FatalMessager, LogAction, FlushOut(..), FlushErr(..),
         ProfAuto(..),
         glasgowExtsFlags,
-        dopt,
+        dopt, dopt_set, dopt_unset,
         gopt, gopt_set, gopt_unset,
         wopt, wopt_set, wopt_unset,
         xopt, xopt_set, xopt_unset,
@@ -1477,6 +1477,10 @@ dopt f dflags = (fromEnum f `IntSet.member` dumpFlags dflags)
 dopt_set :: DynFlags -> DumpFlag -> DynFlags
 dopt_set dfs f = dfs{ dumpFlags = IntSet.insert (fromEnum f) (dumpFlags dfs) }
 
+-- | Unset a 'DumpFlag'
+dopt_unset :: DynFlags -> DumpFlag -> DynFlags
+dopt_unset dfs f = dfs{ dumpFlags = IntSet.delete (fromEnum f) (dumpFlags dfs) }
+
 -- | Test whether a 'GeneralFlag' is set
 gopt :: GeneralFlag -> DynFlags -> Bool
 gopt f dflags  = fromEnum f `IntSet.member` generalFlags dflags





More information about the ghc-commits mailing list