diff options
author | Ben Gamari <bgamari.foss@gmail.com> | 2017-03-15 14:30:33 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-03-15 15:23:22 -0400 |
commit | cc9d574a578090d17d1597628e44371003cb19a7 (patch) | |
tree | e93ecdb8e419e17c28003d9e15e78fe055691b45 /compiler/iface/FlagChecker.hs | |
parent | a7be163196f452530b61cbb526631db946d20e8b (diff) | |
download | haskell-cc9d574a578090d17d1597628e44371003cb19a7.tar.gz |
Introduce and use EnumSet in DynFlags
This factors out a repeated pattern found in DynFlags, where we use an
IntSet and Enum to represent sets of flags.
Requires bump of haddock submodule.
Test Plan: validate
Reviewers: austin, goldfire
Subscribers: rwbarton, thomie, snowleopard
Differential Revision: https://phabricator.haskell.org/D3331
Diffstat (limited to 'compiler/iface/FlagChecker.hs')
-rw-r--r-- | compiler/iface/FlagChecker.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/iface/FlagChecker.hs b/compiler/iface/FlagChecker.hs index a0654b01e6..b21c2ce591 100644 --- a/compiler/iface/FlagChecker.hs +++ b/compiler/iface/FlagChecker.hs @@ -16,7 +16,7 @@ import Fingerprint import BinFingerprint -- import Outputable -import qualified Data.IntSet as IntSet +import qualified EnumSet import System.FilePath (normalise) -- | Produce a fingerprint of a @DynFlags@ value. We only base @@ -39,7 +39,7 @@ fingerprintDynFlags dflags@DynFlags{..} this_mod nameio = -- *all* the extension flags and the language lang = (fmap fromEnum language, - IntSet.toList $ extensionFlags) + map fromEnum $ EnumSet.toList extensionFlags) -- -I, -D and -U flags affect CPP cpp = (map normalise includePaths, opt_P dflags ++ picPOpts dflags) |