File tree 1 file changed +10
-9
lines changed
cabal-install-solver/src/Distribution/Solver/Modular 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change 2
2
-- | Reordering or pruning the tree in order to prefer or make certain choices.
3
3
module Distribution.Solver.Modular.Preference
4
4
( avoidReinstalls
5
- , deferSetupChoices
5
+ , deferSetupExeChoices
6
6
, deferWeakFlagChoices
7
7
, enforceManualFlags
8
8
, enforcePackageConstraints
@@ -407,17 +407,18 @@ preferBaseGoalChoice = trav go
407
407
isBase (Goal (P (Q _pp pn)) _) = unPN pn == " base"
408
408
isBase _ = False
409
409
410
- -- | Deal with setup dependencies after regular dependencies, so that we can
411
- -- will link setup dependencies against package dependencies when possible
412
- deferSetupChoices :: Tree d c -> Tree d c
413
- deferSetupChoices = trav go
410
+ -- | Deal with setup and build-tool-depends dependencies after regular dependencies,
411
+ -- so we will link setup/exe dependencies against package dependenc ies when possible
412
+ deferSetupExeChoices :: Tree d c -> Tree d c
413
+ deferSetupExeChoices = trav go
414
414
where
415
- go (GoalChoiceF rdm xs) = GoalChoiceF rdm (P. preferByKeys noSetup xs)
415
+ go (GoalChoiceF rdm xs) = GoalChoiceF rdm (P. preferByKeys noSetupOrExe xs)
416
416
go x = x
417
417
418
- noSetup :: Goal QPN -> Bool
419
- noSetup (Goal (P (Q (PackagePath _ns (QualSetup _)) _)) _) = False
420
- noSetup _ = True
418
+ noSetupOrExe :: Goal QPN -> Bool
419
+ noSetupOrExe (Goal (P (Q (PackagePath _ns (QualSetup _)) _)) _) = False
420
+ noSetupOrExe (Goal (P (Q (PackagePath _ns (QualExe _ _)) _)) _) = False
421
+ noSetupOrExe _ = True
421
422
422
423
-- | Transformation that tries to avoid making weak flag choices early.
423
424
-- Weak flags are trivial flags (not influencing dependencies) or such
You can’t perform that action at this time.
0 commit comments