Fix some warnings

This commit is contained in:
Michael Snoyman 2013-06-03 16:08:46 +03:00
parent 05e45b4df6
commit 9e6815a8d3
2 changed files with 4 additions and 5 deletions

View File

@ -104,7 +104,7 @@ loadPackageDB settings coreMap core deps = do
else mconcat $ map (go gpd . snd) $ condTestSuites gpd
, mconcat $ map (go gpd . snd) $ condBenchmarks gpd
], not $ null $ condTestSuites gpd
, Set.fromList $ map depName $ allBuildInfo p gpd
, Set.fromList $ map depName $ allBuildInfo gpd
, Just gpd
, Set.fromList $ map (Executable . fst) $ condExecutables gpd
, listToMaybe $ catMaybes
@ -113,7 +113,7 @@ loadPackageDB settings coreMap core deps = do
)
_ -> (mempty, defaultHasTestSuites, Set.empty, Nothing, Set.empty, Nothing)
where
allBuildInfo p gpd = concat
allBuildInfo gpd = concat
[ maybe mempty (goBI libBuildInfo) $ condLibrary gpd
, concat $ map (goBI buildInfo . snd) $ condExecutables gpd
, if skipTests p
@ -123,10 +123,10 @@ loadPackageDB settings coreMap core deps = do
]
where
goBI f x = buildTools $ f $ condTreeData x
depName (Dependency (PackageName p) _) = Executable p
depName (Dependency (PackageName pn) _) = Executable pn
go gpd tree
= 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)
checkCond gpd (cond, tree, melse)

View File

@ -6,7 +6,6 @@ import qualified Data.Set as Set
import Prelude hiding (pi)
import Stackage.Types
import Stackage.Util
import System.Exit (exitFailure)
-- | Narrow down the database to only the specified packages and all of
-- their dependencies.