on master help sign in
Fix some warnings
9e6815aMichael Snoyman
Stackage/LoadDatabase.hs+4−4
@@ -104,7 +104,7 @@ loadPackageDB settings coreMap core deps = do
104 else mconcat $ map (go gpd . snd) $ condTestSuites gpd
104 else mconcat $ map (go gpd . snd) $ condTestSuites gpd
105 , mconcat $ map (go gpd . snd) $ condBenchmarks gpd
105 , mconcat $ map (go gpd . snd) $ condBenchmarks gpd
106 ], not $ null $ condTestSuites gpd
106 ], not $ null $ condTestSuites gpd
107− , Set.fromList $ map depName $ allBuildInfo p gpd
107+ , Set.fromList $ map depName $ allBuildInfo gpd
108 , Just gpd
108 , Just gpd
109 , Set.fromList $ map (Executable . fst) $ condExecutables gpd
109 , Set.fromList $ map (Executable . fst) $ condExecutables gpd
110 , listToMaybe $ catMaybes
110 , listToMaybe $ catMaybes
@@ -113,7 +113,7 @@ loadPackageDB settings coreMap core deps = do
113 )
113 )
114 _ -> (mempty, defaultHasTestSuites, Set.empty, Nothing, Set.empty, Nothing)
114 _ -> (mempty, defaultHasTestSuites, Set.empty, Nothing, Set.empty, Nothing)
115 where
115 where
116− allBuildInfo p gpd = concat
116+ allBuildInfo gpd = concat
117 [ maybe mempty (goBI libBuildInfo) $ condLibrary gpd
117 [ maybe mempty (goBI libBuildInfo) $ condLibrary gpd
118 , concat $ map (goBI buildInfo . snd) $ condExecutables gpd
118 , concat $ map (goBI buildInfo . snd) $ condExecutables gpd
119 , if skipTests p
119 , if skipTests p
@@ -123,10 +123,10 @@ loadPackageDB settings coreMap core deps = do
123 ]
123 ]
124 where
124 where
125 goBI f x = buildTools $ f $ condTreeData x
125 goBI f x = buildTools $ f $ condTreeData x
126− depName (Dependency (PackageName p) _) = Executable p
126+ depName (Dependency (PackageName pn) _) = Executable pn
127 go gpd tree
127 go gpd tree
128 = Map.unionsWith unionVersionRanges
128 = Map.unionsWith unionVersionRanges
129− $ Map.fromList (map (\(Dependency p vr) -> (p, vr)) $ condTreeConstraints tree)
129+ $ Map.fromList (map (\(Dependency pn vr) -> (pn, vr)) $ condTreeConstraints tree)
130 : map (go gpd) (mapMaybe (checkCond gpd) $ condTreeComponents tree)
130 : map (go gpd) (mapMaybe (checkCond gpd) $ condTreeComponents tree)
131
131
132 checkCond gpd (cond, tree, melse)
132 checkCond gpd (cond, tree, melse)
Stackage/NarrowDatabase.hs−1
@@ -6,7 +6,6 @@ import qualified Data.Set as Set
6import Prelude hiding (pi)
6import Prelude hiding (pi)
7import Stackage.Types
7import Stackage.Types
8import Stackage.Util
8import Stackage.Util
9−import System.Exit (exitFailure)
10
9
11-- | Narrow down the database to only the specified packages and all of
10-- | Narrow down the database to only the specified packages and all of
12-- their dependencies.
11-- their dependencies.