[Haskell-cafe] Problem with cabal-install where package
requires* mutually exclusive versions of another package
duncan.coutts at worc.ox.ac.uk
Sat Mar 14 11:40:04 EDT 2009
On Sat, 2009-03-14 at 19:10 +1100, Mark Wassell wrote:
> I am trying install a package using cabal-install however the package
> requies an older version of QuickCheck and one of the required packages
> requires the latest version:
> $ cabal fetch Reactive
> Resolving dependencies...
> cabal.exe: cannot configure Stream-0.3.1. It requires QuickCheck >=2.0
> For the dependency on QuickCheck >=2.0 there are these packages:
> QuickCheck-2.1 and QuickCheck-188.8.131.52. However none of them are available.
> QuickCheck-2.1 was excluded because checkers-0.1.3 requires QuickCheck <2.0
> QuickCheck-2.1 was excluded because reactive-0.10.5 requires QuickCheck <2.0
> QuickCheck-184.108.40.206 was excluded because checkers-0.1.3 requires QuickCheck
> QuickCheck-220.127.116.11 was excluded because reactive-0.10.5 requires QuickCheck
The cabal-install solver does not have enough information to know that
it will not break to use multiple versions of QuickCheck so it's looking
for a solution involving only one version. It cannot find one of course.
A medium term solution here should involve letting packages specify that
some of their dependencies are private, ie nothing is re-exported and
thus there is no danger of clashes.
> How can I get around this? I could work around this and install the
> packages individually.
Yes. You'll just have to avoid using "cabal install" because that
invokes the solver. You can either go back to the runghc Setup method or
use the (undocumented) cabal install --only flag.
> Can I have two versions of a package installed (ie QuickCheck) and
> will everything get resolved correctly?
Should do. It will warn you that it's highly likely to break, but if
you're confident that it will not then press on.
More information about the Haskell-Cafe