Skip to content

Commit b3509b9

Browse files
committed
Improve variable names
1 parent 0fcd624 commit b3509b9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Cabal/Distribution/PackageDescription/Configuration.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ resolveWithFlags ::
212212
-- ^ Either the missing dependencies (error case), or a pair of
213213
-- (set of build targets with dependencies, chosen flag assignments)
214214
resolveWithFlags dom os arch impl constrs trees checkDeps =
215-
either (Left . fromDepMapUnion) Right $ explore (build dom [])
215+
either (Left . fromDepMapUnion) Right $ explore (build [] dom)
216216
where
217217
extraConstrs = toDepMap constrs
218218

@@ -243,10 +243,10 @@ resolveWithFlags dom os arch impl constrs trees checkDeps =
243243

244244
-- Builds a tree of all possible flag assignments. Internal nodes
245245
-- 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
250250

251251
tryAll :: [Either DepMapUnion a] -> Either DepMapUnion a
252252
tryAll = foldr mp mz

0 commit comments

Comments
 (0)