[commit: Cabal] master: switch to less precise, more efficient goal reordering (92a4214)
Ian Lynagh
igloo at earth.li
Fri Nov 4 18:06:47 CET 2011
Repository : ssh://darcs.haskell.org//srv/darcs/packages/Cabal
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/92a4214f5345d09e67e3725fe3a6167b49dc2a66
>---------------------------------------------------------------
commit 92a4214f5345d09e67e3725fe3a6167b49dc2a66
Author: Andres Loeh <andres at well-typed.com>
Date: Sun Jul 3 13:43:59 2011 +0000
switch to less precise, more efficient goal reordering
>---------------------------------------------------------------
.../Client/Dependency/Modular/Dependency.hs | 6 +++---
.../Client/Dependency/Modular/Solver.hs | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/cabal-install/Distribution/Client/Dependency/Modular/Dependency.hs b/cabal-install/Distribution/Client/Dependency/Modular/Dependency.hs
index 17a36d0..78c1d4f 100644
--- a/cabal-install/Distribution/Client/Dependency/Modular/Dependency.hs
+++ b/cabal-install/Distribution/Client/Dependency/Modular/Dependency.hs
@@ -74,9 +74,9 @@ showCI (Constrained vr) = showVR (collapse vr)
-- order in which we check the constraints.
merge :: Ord qpn => CI qpn -> CI qpn -> Either (ConflictSet qpn, (CI qpn, CI qpn)) (CI qpn)
merge c@(Fixed i g1) d@(Fixed j g2)
- | i == j = Right c
- | otherwise = Left (S.union (toConflictSet g1) (toConflictSet g2), (c, d))
-merge c@(Fixed (I v _) g1) (Constrained rs) = go rs
+ | i == j = Right c
+ | otherwise = Left (S.union (toConflictSet g1) (toConflictSet g2), (c, d))
+merge c@(Fixed (I v _) g1) (Constrained rs) = go rs -- I tried "reverse rs" here, but it seems to slow things down ...
where
go [] = Right c
go (d@(vr, g2) : vrs)
diff --git a/cabal-install/Distribution/Client/Dependency/Modular/Solver.hs b/cabal-install/Distribution/Client/Dependency/Modular/Solver.hs
index 0c2b1b6..24a4e59 100644
--- a/cabal-install/Distribution/Client/Dependency/Modular/Solver.hs
+++ b/cabal-install/Distribution/Client/Dependency/Modular/Solver.hs
@@ -46,7 +46,7 @@ solve sc idx userPrefs userConstraints userGoals =
where
explorePhase = exploreTreeLog . backjump
heuristicsPhase = if preferEasyGoalChoices sc
- then P.deferDefaultFlagChoices . P.preferEasyGoalChoices
+ then P.deferDefaultFlagChoices . P.lpreferEasyGoalChoices
else id
preferencesPhase = P.preferPackagePreferences userPrefs
validationPhase = P.enforcePackageConstraints userConstraints .
More information about the Cvs-libraries
mailing list