[commit: Cabal] master: As a heuristic, use topological order for the order of package choices (1f2f012)
Ian Lynagh
igloo at earth.li
Fri Jun 24 01:54:30 CEST 2011
Repository : ssh://darcs.haskell.org//srv/darcs/packages/Cabal
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/1f2f0123f1068ec03ebbb8d15b426212aaa4d0d0
>---------------------------------------------------------------
commit 1f2f0123f1068ec03ebbb8d15b426212aaa4d0d0
Author: Duncan Coutts <duncan at haskell.org>
Date: Fri May 30 18:44:37 2008 +0000
As a heuristic, use topological order for the order of package choices
The general case in exploring the state space is that we have a set of
choices (package names) and for each choice we have a number of
versions of that package we could pick. If there's only one version of
a package then we make that choice first. Otherwise we have to pick
some package and select one of the available versions. The question is
which package should we make a choice for first? Previously we picked
completely arbitrarily. Surprisingly this actually works pretty well.
An improvement is to pick packages in topological order. This works
better because it allows dependencies from earlier choices to
constrain our later choices.
cabal-install/Hackage/Dependency/TopDown.hs | 105 +++++++++++++++++----
cabal-install/Hackage/Dependency/TopDown/Types.hs | 20 ++++-
cabal-install/cabal-install.cabal | 2 +-
3 files changed, 104 insertions(+), 23 deletions(-)
Diff suppressed because of size. To see it, use:
git show 1f2f0123f1068ec03ebbb8d15b426212aaa4d0d0
More information about the Cvs-libraries
mailing list