Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
Cabal
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Glasgow Haskell Compiler
Packages
Cabal
Commits
3ac512e4
Commit
3ac512e4
authored
3 years ago
by
Gershom Bazerman
Browse files
Options
Downloads
Patches
Plain Diff
defer build-tools-depends choices as well as setup choices
parent
dab09b2c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cabal-install-solver/src/Distribution/Solver/Modular/Preference.hs
+10
-9
10 additions, 9 deletions
...tall-solver/src/Distribution/Solver/Modular/Preference.hs
with
10 additions
and
9 deletions
cabal-install-solver/src/Distribution/Solver/Modular/Preference.hs
+
10
−
9
View file @
3ac512e4
...
...
@@ -2,7 +2,7 @@
-- | Reordering or pruning the tree in order to prefer or make certain choices.
module
Distribution.Solver.Modular.Preference
(
avoidReinstalls
,
deferSetupChoices
,
deferSetup
Exe
Choices
,
deferWeakFlagChoices
,
enforceManualFlags
,
enforcePackageConstraints
...
...
@@ -407,17 +407,18 @@ preferBaseGoalChoice = trav go
isBase
(
Goal
(
P
(
Q
_pp
pn
))
_
)
=
unPN
pn
==
"base"
isBase
_
=
False
-- | Deal with setup dependencies after regular dependencies,
so that we can
-- will link setup dependencies against package dependencies when possible
deferSetupChoices
::
Tree
d
c
->
Tree
d
c
deferSetupChoices
=
trav
go
-- | Deal with setup
and build-tool-depends
dependencies after regular dependencies,
--
so we
will link setup
/exe
dependencies against package dependenc
ies when possible
deferSetup
Exe
Choices
::
Tree
d
c
->
Tree
d
c
deferSetup
Exe
Choices
=
trav
go
where
go
(
GoalChoiceF
rdm
xs
)
=
GoalChoiceF
rdm
(
P
.
preferByKeys
noSetup
xs
)
go
(
GoalChoiceF
rdm
xs
)
=
GoalChoiceF
rdm
(
P
.
preferByKeys
noSetup
OrExe
xs
)
go
x
=
x
noSetup
::
Goal
QPN
->
Bool
noSetup
(
Goal
(
P
(
Q
(
PackagePath
_ns
(
QualSetup
_
))
_
))
_
)
=
False
noSetup
_
=
True
noSetupOrExe
::
Goal
QPN
->
Bool
noSetupOrExe
(
Goal
(
P
(
Q
(
PackagePath
_ns
(
QualSetup
_
))
_
))
_
)
=
False
noSetupOrExe
(
Goal
(
P
(
Q
(
PackagePath
_ns
(
QualExe
_
_
))
_
))
_
)
=
False
noSetupOrExe
_
=
True
-- | Transformation that tries to avoid making weak flag choices early.
-- Weak flags are trivial flags (not influencing dependencies) or such
...
...
This diff is collapsed.
Click to expand it.
Ben Gamari
@bgamari
mentioned in commit
ecfa9d11
·
3 years ago
mentioned in commit
ecfa9d11
mentioned in commit ecfa9d11e0b07fbaec033a5128ca972627c12ba3
Toggle commit list
Ben Gamari
@bgamari
mentioned in commit
af6936e0
·
3 years ago
mentioned in commit
af6936e0
mentioned in commit af6936e063d2c2e6aa16339cd6be5182df8e8f81
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment