diff options
author | Ian Lynagh <ian@well-typed.com> | 2013-03-03 17:35:02 +0000 |
---|---|---|
committer | Ian Lynagh <ian@well-typed.com> | 2013-03-03 17:53:17 +0000 |
commit | 175b12411c0d571bd5d5594db7de5e4686099953 (patch) | |
tree | 019e8704117dab6e7d76c964c5609ac71d083504 | |
parent | 52ba2ceef335c036be9527659e416e20f136c660 (diff) | |
download | haskell-175b12411c0d571bd5d5594db7de5e4686099953.tar.gz |
Export dopt_set, dopt_unset
We don't need them, but GHC API users might.
-rw-r--r-- | compiler/main/DynFlags.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index 3591a30d25..479516d50f 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 |