[Haskell-cafe] Warning: Module `Prelude' is deprecated:

Jason Dagit dagit at codersbase.com
Thu Aug 26 22:01:31 EDT 2010


On Thu, Aug 26, 2010 at 6:45 PM, Ivan Lazar Miljenovic <
ivan.miljenovic at gmail.com> wrote:

> On 27 August 2010 11:42, Mathew de Detrich <deteego at gmail.com> wrote:
> > As said, this is an issue with the package maintainer who explicitly used
> > base 3.0 as a dependancy
>
> Or they have no upper bound on the version of base in their .cabal
> file, so cabal-install tries to be clever and defaults to base-3 to be
> safe (from when base-4 was introduced and many packages wouldn't build
> with it).
>

Cabal-install further has a bug here where --constraint="base>=4" will have
no effect.  Instead you have to say you "prefer" base 4.  So, cabal install
--preference="base>=4".  I don't understand why preferences override
constraints, but that's the way it works for parsec and base (most other
packages are not handled in this buggy way).


>
> Nowadays, is there any reason why we need to consider base-3
> compatibility any more?  Is it viable to just use base-4 and not
> bother with extensible-exceptions as a compatibility layer?
>

I've added preference: base >= 4, in my global cabal-install config and I
haven't had a single issue since.  I HIGHLY recommend everyone to do this.
 I think the way cabal-install ignores constraints on base and parsec to be
a rather serious bug in the hackage infrastructure.  Yes, I know about the
historic reason that prompted this bug to be added to cabal-install.  Still,
I think cabal-install should either do what the user requests, or fail with
an explanation.  People should be forced to fix their packages.  The current
behavior of ignoring constraints against base has cost me more time than it
has saved, I'm sure.

Note:  cabal install foo --constraint="base >= 4 && base <5", might also
work, specifically adding an upper bound on the command line.  Once I found
the preference trick I never went back to try it.

Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20100826/c8965eaa/attachment.html


More information about the Haskell-Cafe mailing list