[Haskell-cafe] problems installing latest parsec

Daniel Fischer daniel.is.fischer at web.de
Tue Nov 2 20:04:51 EDT 2010

On Wednesday 03 November 2010 00:46:13, Michael Litchard wrote:
> Here's what cabal says I have installed
> * parsec
>     Synopsis: Monadic parser combinators
>     Latest version available: 3.1.0
>     Latest version installed:
>     Homepage: http://www.cs.uu.nl/~daan/parsec.html
>     License:  BSD3
> but here is what happens when I try to upgrade
> cabal upgrade parsec
> Resolving dependencies...
> No packages to be installed. All the requested packages are already
> installed. If you want to reinstall anyway then use the --reinstall
> flag.
> mlitchard at kether:~/projects/perf/autoperf/session_creator$
> Any clues as to what I can try next to fix things would be appreciated.

$ cabal install parsec-3.1.0

There's a preferred version constraint on parsec, so by default cabal 
installs parsec-2 rather than parsec-3, you have to tell it explicitly to 
install parsec-3. It might be necessary to tell cabal to use parsec-3 also 
when installing other packages that depend on parsec,

$ cabal install --constraint="parsec == 3.1.0" whatever

should do the trick then (if it doesn't use the --preference flag instead 
of --constraint).

More information about the Haskell-Cafe mailing list