[Haskell-cafe] Supporting both cabals?

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Thu Jan 3 17:21:37 EST 2008


In message <477D5304.3030007 at therning.org> Magnus Therning <magnus at therning.org>
writes:
> GHC 6.8 has just made it into Debian in a usable form.  (w00t!)
> 
> Due to the library split my old cabal files don't work any longer.
> updating them isn't the problem, the problem is keeping them compatible
> with both versions of Cabal.  I searched the wiki (quickly) but didn't
> find anything on this topic.  Is there a cookbook out there for it?

Cabal is backwards compatible for .cabal files, so if it works with the old one
it'll still be ok.

If you need a complex custom Setup.hs file then that's quite a different matter
and there's no sensible way of making that work with both (unless you can find
some hack using type classes or cpp).

If you want to take advantage of new features in Cabal then unless it's
something very simple like using new fields (which old cabal versions will warn
about but otherwise ignore) then you can't really use them and remain compatible
with older cabal versions. This applies particularly to the new configurations
which uses new syntax that the Cabal-1.1.x versions to not understand.

Duncan


More information about the Haskell-Cafe mailing list