tags:

views:

45

answers:

1

I'm trying to install quickcheck 2 via cabal on Ubuntu 10.04. No matter what I try to do, I always end up with the following:

$ cabal list quickcheck
* QuickCheck
    Synopsis: Automatic testing of Haskell programs
    Latest version available: 2.1.1.1
    Latest version installed: 1.2.0.0
    Homepage: http://www.cse.chalmers.se/~koen
    License:  BSD3

This is on a clean Ubuntu 10.04 with only the ghc6 and cabal-install apt packages installed. I had installed the binary package via cabal before trying to install quickcheck.

It tells me 2.1.1.1 is available, but it only ever installs 1.2.0.0. Why can't I get it to actually install the latest version?

A: 
$ cabal install --dry-run quickcheck
Resolving dependencies...
In order, the following would be installed (use -v for more details):
QuickCheck-1.2.0.0

I'm not sure why it chooses the old version, but you can just do:

$ cabal install --dry-run quickcheck-2.1
Resolving dependencies...
In order, the following would be installed (use -v for more details):
mtl-1.1.0.2
QuickCheck-2.1

You can be more specific in the version number, but you don't have to.

Thomas
But it sounds like if I don't, then it installs the old version by default. I think the question is how do I make it install the latest version? And not necessarily a specific version because I'd like to create a script that installs the latest version automatically.
qrest
`cabal install 'quickcheck > 2'`.Quickcheck is one of a few packages that cabal prefers the old version (this is semi-hardcoded). This came about as a hack to avoid breakage when lots of packages didn't specify upper version bounds, and significant breaking changes to widely-used packages were released. Eventually, I hope, it will go away.
sclv