mirror of
https://github.com/commercialhaskell/stackage.git
synced 2026-01-19 10:41:57 +01:00
Fix some warnings
This commit is contained in:
parent
05e45b4df6
commit
9e6815a8d3
@ -104,7 +104,7 @@ loadPackageDB settings coreMap core deps = do
|
|||||||
else mconcat $ map (go gpd . snd) $ condTestSuites gpd
|
else mconcat $ map (go gpd . snd) $ condTestSuites gpd
|
||||||
, mconcat $ map (go gpd . snd) $ condBenchmarks gpd
|
, mconcat $ map (go gpd . snd) $ condBenchmarks gpd
|
||||||
], not $ null $ condTestSuites gpd
|
], not $ null $ condTestSuites gpd
|
||||||
, Set.fromList $ map depName $ allBuildInfo p gpd
|
, Set.fromList $ map depName $ allBuildInfo gpd
|
||||||
, Just gpd
|
, Just gpd
|
||||||
, Set.fromList $ map (Executable . fst) $ condExecutables gpd
|
, Set.fromList $ map (Executable . fst) $ condExecutables gpd
|
||||||
, listToMaybe $ catMaybes
|
, listToMaybe $ catMaybes
|
||||||
@ -113,7 +113,7 @@ loadPackageDB settings coreMap core deps = do
|
|||||||
)
|
)
|
||||||
_ -> (mempty, defaultHasTestSuites, Set.empty, Nothing, Set.empty, Nothing)
|
_ -> (mempty, defaultHasTestSuites, Set.empty, Nothing, Set.empty, Nothing)
|
||||||
where
|
where
|
||||||
allBuildInfo p gpd = concat
|
allBuildInfo gpd = concat
|
||||||
[ maybe mempty (goBI libBuildInfo) $ condLibrary gpd
|
[ maybe mempty (goBI libBuildInfo) $ condLibrary gpd
|
||||||
, concat $ map (goBI buildInfo . snd) $ condExecutables gpd
|
, concat $ map (goBI buildInfo . snd) $ condExecutables gpd
|
||||||
, if skipTests p
|
, if skipTests p
|
||||||
@ -123,10 +123,10 @@ loadPackageDB settings coreMap core deps = do
|
|||||||
]
|
]
|
||||||
where
|
where
|
||||||
goBI f x = buildTools $ f $ condTreeData x
|
goBI f x = buildTools $ f $ condTreeData x
|
||||||
depName (Dependency (PackageName p) _) = Executable p
|
depName (Dependency (PackageName pn) _) = Executable pn
|
||||||
go gpd tree
|
go gpd tree
|
||||||
= Map.unionsWith unionVersionRanges
|
= Map.unionsWith unionVersionRanges
|
||||||
$ Map.fromList (map (\(Dependency p vr) -> (p, vr)) $ condTreeConstraints tree)
|
$ Map.fromList (map (\(Dependency pn vr) -> (pn, vr)) $ condTreeConstraints tree)
|
||||||
: map (go gpd) (mapMaybe (checkCond gpd) $ condTreeComponents tree)
|
: map (go gpd) (mapMaybe (checkCond gpd) $ condTreeComponents tree)
|
||||||
|
|
||||||
checkCond gpd (cond, tree, melse)
|
checkCond gpd (cond, tree, melse)
|
||||||
|
|||||||
@ -6,7 +6,6 @@ import qualified Data.Set as Set
|
|||||||
import Prelude hiding (pi)
|
import Prelude hiding (pi)
|
||||||
import Stackage.Types
|
import Stackage.Types
|
||||||
import Stackage.Util
|
import Stackage.Util
|
||||||
import System.Exit (exitFailure)
|
|
||||||
|
|
||||||
-- | Narrow down the database to only the specified packages and all of
|
-- | Narrow down the database to only the specified packages and all of
|
||||||
-- their dependencies.
|
-- their dependencies.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user