Supporting various versions of Cabal

Duncan Coutts duncan.coutts at
Thu Nov 29 07:27:01 EST 2007

On Thu, 2007-11-29 at 09:27 +0000, Alistair Bayley wrote:
> Hello,
> Is there a story for supporting various versions of Cabal in a
> package? For Takusen we now have three different Setup.lhs files, for
> Cabal versions 1.1.4,, and 1.2. I'm not sure I want to discard
> the Setup scripts for the older versions, as this allows users with
> older installations to use Takusen without being forced to upgrade
> their Cabal package. However, I'm also conscious that latest Cabal
> works with versions of ghc back to 6.4 (if not earlier), so is this a
> non-issue? Is it reasonable to require users to upgrade Cabal to a
> newer version than the one that ships with their compiler, just to get
> your package to build?

That's the only mechanism Cabal HQ supports, ie using the recent Cabal
with any of the older Haskell implementations. It's not too hard to
upgrade Cabal (even if you're not root) and it's pretty hard to keep
Cabal's library API stable. Note that the .cabal file format is pretty
much fully backwards compatible but the Cabal library interface was
never designed as a stable API so almost all internal improvements end
up changing it. This is one reason we currently recommend using as
little custom code in Setup.lhs files as possible.


More information about the Libraries mailing list