Difference between revisions of "Upgrading packages"

From HaskellWiki
Jump to: navigation, search
(Rewrite of most of the page)
m (Added two links)
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:
   
 
* [https://ghc.haskell.org/trac/ghc/wiki/Migration Migration Guide]; this page provides information to help migrating between major GHC releases.
 
* [https://ghc.haskell.org/trac/ghc/wiki/Migration Migration Guide]; this page provides information to help migrating between major GHC releases.
  +
* [https://github.com/haskell/cabal/wiki/2.2-migration-guide 2.2 migration guide]; updating for Cabal 2.2
  +
* [http://coldwa.st/e/blog/2017-09-09-Cabal-2-0.html What's new in Cabal/cabal-install 2.0 — improved new-build, Backpack, foreign libraries and more!] (blog article)
 
* [https://github.com/haskell/cabal/wiki/2.0-migration-guide 2.0 migration guide]; updating for Cabal 2.0
 
* [https://github.com/haskell/cabal/wiki/2.0-migration-guide 2.0 migration guide]; updating for Cabal 2.0
 
* [[/Updating to GHC 7]]
 
* [[/Updating to GHC 7]]
Line 14: Line 16:
   
 
To maintain compatibility with older versions of GHC, use a conditional block in the .cabal file, checking on implementation (ghc >= x.y.z). For example:
 
To maintain compatibility with older versions of GHC, use a conditional block in the .cabal file, checking on implementation (ghc >= x.y.z). For example:
 
  +
<pre>
if impl(ghc >= 6.12)
+
if impl(ghc >= 6.12)
ghc-options: -fno-warn-unused-do-bind
+
ghc-options: -fno-warn-unused-do-bind
  +
</pre>

Latest revision as of 20:19, 19 March 2018

Information about adapting packages to new a version of GHC or Cabal can be found on the following pages:

Detailed information about changes in the latest GHC release can be found in the GHC User’s Guide

Most new tips for fixing build failures are tracked at https://github.com/haskell-infra/hackage-trustees/blob/master/cookbook.md

Compatibility with older GHC

To maintain compatibility with older versions of GHC, use a conditional block in the .cabal file, checking on implementation (ghc >= x.y.z). For example:

  if impl(ghc >= 6.12)
    ghc-options:     -fno-warn-unused-do-bind