Upgrading packages

From HaskellWiki
Revision as of 11:44, 15 December 2011 by KetilMalde (talk | contribs) (solved conditional ghc options.)

Jump to: navigation, search

A list of things that need updating when porting packages to newer library/cabal versions.

If you maintain a Haskell package this is for you. For older versions of this document:

Updating to GHC 7.0

When upgrading to GHC 7.0, any of your packages that worked against the base-3 library will need to be updated to the base-4.

Compatibility with older GHC

Use cabal's conditional thingy, checking on impl(ghc >= x.yz). E.g:

   if impl(ghc >= 6.12)
       Ghc-Options:       -Wall -fexcess-precision -funbox-strict-fields -auto-all -fno-warn-unused-do-bind
       Ghc-Options:       -Wall -fexcess-precision -funbox-strict-fields -auto-all

(This is a stub, since the previous version was so out-of-date. Please help by adding useful content.)