on master help sign in
disabledFlags
3b61280Michael Snoyman
Stackage/LoadDatabase.hs+3−1
@@ -128,7 +128,9 @@ loadPackageDB settings core deps = do
128 where
128 where
129 checkCond' (Var (OS os)) = os == buildOS
129 checkCond' (Var (OS os)) = os == buildOS
130 checkCond' (Var (Arch arch)) = arch == buildArch
130 checkCond' (Var (Arch arch)) = arch == buildArch
131− checkCond' (Var (Flag flag)) = flag `elem` flags'
131+ checkCond' (Var (Flag flag@(FlagName flag'))) =
132+ flag' `Set.notMember` disabledFlags settings &&
133+ flag `elem` flags'
132 checkCond' (Var (Impl compiler range)) =
134 checkCond' (Var (Impl compiler range)) =
133 compiler == GHC && withinRange targetCompilerVersion range
135 compiler == GHC && withinRange targetCompilerVersion range
134 checkCond' (Lit b) = b
136 checkCond' (Lit b) = b
Stackage/Select.hs+1
@@ -23,6 +23,7 @@ defaultSelectSettings = SelectSettings
23 , requireHaskellPlatform = True
23 , requireHaskellPlatform = True
24 , excludedPackages = empty
24 , excludedPackages = empty
25 , flags = Set.fromList $ words "blaze_html_0_5"
25 , flags = Set.fromList $ words "blaze_html_0_5"
26+ , disabledFlags = Set.fromList $ words "bytestring-in-base"
26 , allowedPackage = const $ Right ()
27 , allowedPackage = const $ Right ()
27 , useGlobalDatabase = False
28 , useGlobalDatabase = False
28 }
29 }
Stackage/Types.hs+2
@@ -93,6 +93,8 @@ data SelectSettings = SelectSettings
93 { haskellPlatformCabal :: FilePath
93 { haskellPlatformCabal :: FilePath
94 , flags :: Set String
94 , flags :: Set String
95 -- ^ Compile flags which should be turned on.
95 -- ^ Compile flags which should be turned on.
96+ , disabledFlags :: Set String
97+ -- ^ Compile flags which should always be disabled.
96 , extraCore :: Set PackageName
98 , extraCore :: Set PackageName
97 , requireHaskellPlatform :: Bool
99 , requireHaskellPlatform :: Bool
98 , allowedPackage :: GenericPackageDescription -> Either String ()
100 , allowedPackage :: GenericPackageDescription -> Either String ()