[Haskell-cafe] Cabal and more than one version
Duncan Coutts
duncan.coutts at worc.ox.ac.uk
Thu Nov 20 06:12:07 EST 2008
On Wed, 2008-11-19 at 02:15 -0800, Jason Dusek wrote:
> Duncan Coutts <duncan.coutts at worc.ox.ac.uk> wrote:
> > Jason Dusek wrote:
> > > In the ticket, someone says:
> > >
> > > True though I suspect it looks a bit weird to the
> > > uninitiated. We know to read the conditional syntax as an
> > > implication constraint which can be applied in either
> > > direction but I suspect many people read it in a directed
> > > functional way.
> > >
> > > Does that mean you don't have to actually set 'splitBase'
> > > explicitly?
> >
> > No, that is the point. You do not have to. The choice for the
> > flag is completely determined automatically by the version of
> > the base package that is chosen.
>
> When you say "chosen" is that the same as "detected"?
No. Each package can only be built against a single version of a
dependent package. So chosen really means chosen. It is the single
version of the dependent package that we end up building your package
against.
> With 6.10, both versions of base are available -- what happens
> then? The environment chooses the latest one?
Good example. So in that case the system (with optional input from the
user / package manager) has to choose one of them. Often there will be a
constraint from the package so that there will be no real choice. When
the choice is not constrained then it is more complicated:
* 'rughc Setup configure' and 'cabal configure' use a simple (and
occasionally wrong) heuristic to pick the latest version.
* 'cabal install' uses a simple constraint solver and some global
and local preferences to make the choice. At the moment the
global preference is to pick base 3, because many many packages
say "build-depends: base >= 3" but in fact fail when built with
base-4. So the preference is a kind of patch to keep them
building.
Duncan
More information about the Haskell-Cafe
mailing list