Supporting both cabals?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Supporting both cabals?

Magnus Therning
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?

/M

--
Magnus Therning                             (OpenPGP: 0xAB4DFBA4)
magnus@therning.org             Jabber: magnus.therning@gmail.com
http://therning.org/magnus

What if I don't want to obey the laws? Do they throw me in jail with
the other bad monads?
     -- Daveman


_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe

signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Supporting both cabals?

Judah Jacobson
On Jan 3, 2008 4:26 PM, Magnus Therning <[hidden email]> wrote:
> 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?

The standard fix is to use Cabal configurations:
http://www.haskell.org/haskellwiki/Upgrading_packages

Best,
-Judah
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Supporting both cabals?

Duncan Coutts
In reply to this post by Magnus Therning
In message <[hidden email]> Magnus Therning <[hidden email]>
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
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe