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 @@ -212,7 +212,7 @@ resolveWithFlags ::
212
212
-- ^ Either the missing dependencies (error case), or a pair of
213
213
-- (set of build targets with dependencies, chosen flag assignments)
214
214
resolveWithFlags dom os arch impl constrs trees checkDeps =
215
- either (Left . fromDepMapUnion) Right $ explore (build dom [] )
215
+ either (Left . fromDepMapUnion) Right $ explore (build [] dom )
216
216
where
217
217
extraConstrs = toDepMap constrs
218
218
@@ -243,10 +243,10 @@ resolveWithFlags dom os arch impl constrs trees checkDeps =
243
243
244
244
-- Builds a tree of all possible flag assignments. Internal nodes
245
245
-- have only partial assignments.
246
- build :: [(FlagName , [Bool ])] -> FlagAssignment -> Tree FlagAssignment
247
- build [] flags = Node flags []
248
- build ((n , vals): rest) flags =
249
- Node flags $ map (\ v -> build rest ((n , v): flags) ) vals
246
+ build :: FlagAssignment -> [(FlagName , [Bool ])] -> Tree FlagAssignment
247
+ build assigned [] = Node assigned []
248
+ build assigned ((fn , vals) : unassigned) =
249
+ Node assigned $ map (\ v -> build ((fn , v) : assigned) unassigned ) vals
250
250
251
251
tryAll :: [Either DepMapUnion a ] -> Either DepMapUnion a
252
252
tryAll = foldr mp mz
You can’t perform that action at this time.
0 commit comments