File tree 1 file changed +5
-5
lines changed
Cabal/Distribution/PackageDescription 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -225,7 +225,7 @@ resolveWithFlags ::
225
225
-- ^ Either the missing dependencies (error case), or a pair of
226
226
-- (set of build targets with dependencies, chosen flag assignments)
227
227
resolveWithFlags dom os arch impl constrs trees checkDeps =
228
- either (Left . fromDepMapUnion) Right $ explore (build dom [] )
228
+ either (Left . fromDepMapUnion) Right $ explore (build [] dom )
229
229
where
230
230
extraConstrs = toDepMap constrs
231
231
@@ -255,10 +255,10 @@ resolveWithFlags dom os arch impl constrs trees checkDeps =
255
255
256
256
-- Builds a tree of all possible flag assignments. Internal nodes
257
257
-- have only partial assignments.
258
- build :: [(FlagName , [Bool ])] -> FlagAssignment -> Tree FlagAssignment
259
- build [] flags = Node flags []
260
- build ((n , vals): rest) flags =
261
- Node flags $ map (\ v -> build rest ((n , v): flags) ) vals
258
+ build :: FlagAssignment -> [(FlagName , [Bool ])] -> Tree FlagAssignment
259
+ build assigned [] = Node assigned []
260
+ build assigned ((fn , vals) : unassigned) =
261
+ Node assigned $ map (\ v -> build ((fn , v) : assigned) unassigned ) vals
262
262
263
263
tryAll :: [Either DepMapUnion a ] -> Either DepMapUnion a
264
264
tryAll = foldr mp mz
You can’t perform that action at this time.
0 commit comments