Skip to content

Commit 561dc48

Browse files
committed
Improve variable names
1 parent b0f36fa commit 561dc48

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
@@ -225,7 +225,7 @@ resolveWithFlags ::
225225
-- ^ Either the missing dependencies (error case), or a pair of
226226
-- (set of build targets with dependencies, chosen flag assignments)
227227
resolveWithFlags dom os arch impl constrs trees checkDeps =
228-
either (Left . fromDepMapUnion) Right $ explore (build dom [])
228+
either (Left . fromDepMapUnion) Right $ explore (build [] dom)
229229
where
230230
extraConstrs = toDepMap constrs
231231

@@ -255,10 +255,10 @@ resolveWithFlags dom os arch impl constrs trees checkDeps =
255255

256256
-- Builds a tree of all possible flag assignments. Internal nodes
257257
-- 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
262262

263263
tryAll :: [Either DepMapUnion a] -> Either DepMapUnion a
264264
tryAll = foldr mp mz

0 commit comments

Comments
 (0)