Cabal Release Candidate

Simon Marlow simonmar at
Thu Jul 14 11:10:41 EDT 2005

On 14 July 2005 14:45, Simon Marlow wrote:

> When I installed the new Cabal globally (onto GHC 6.4), the old one
> was hidden automatically, so the suggestion for unregistering the old
> one in the README is unecessary.

I take it back.  If you don't unregister the old one, then "-package
Cabal" results in an error from GHC ("Cabal matches multiple packages"),
and building GHC fails.  In hindsight this was a bad choice, I'm going
to change it so that -package P picks the latest version of P if a
particular version isn't specified.

However, upgrading Cabal might still cause problems for GHC, because our
build system relies on knowing what version of GHC you're building with
to know what version of Cabal you're using.  This is not really Cabal's

> So to summarise:
>   - to install globally / with root access: should "just work"
>   - to install just for me: copy+hide Cabal-1.0, then install the
>     new one with --user.
> I should really do something about this for 6.4.1.  Everything seems a
> bit adhoc, though.  Perhaps: in the absence of any package flags to
> the contrary, GHC could default to hiding all but the newest version
> of packages which have more than one version exposed?

I've made the following changes for 6.4.1:

  - -package P picks the latest version of P, instead of complaining
    if P is ambiguous.

  - -hide-package P hides all versions of P, instead of complaining
    if P is ambiguous.

  - -package P hides all other versions of P (this was advertised
    in the documentation, but wasn't actually implemented in 6.4)

  - if multiple packages with the same name are still exposed after
    the flags have been processed, then all except the latest version
    are hidden.

This is aimed at reducing the error cases and making it DTRT for most
people.  Comments?


More information about the Libraries mailing list