Difference between revisions of "Upgrading packages"
Jump to navigation
Jump to search
KetilMalde (talk | contribs) (request for information) |
m (Added two links) |
||
(8 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
+ | Information about adapting packages to new a version of GHC or Cabal can be found on the following pages: |
||
− | 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: |
||
+ | * [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 |
||
⚫ | |||
* [[/Updating to GHC 6.10]] |
* [[/Updating to GHC 6.10]] |
||
* [[/Updating to GHC 6.8]] |
* [[/Updating to GHC 6.8]] |
||
+ | Detailed information about changes in the latest GHC release can be found in the [https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/index.html 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 |
||
⚫ | |||
− | |||
− | 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. |
||
− | |||
− | '''Wanted - catering to GHC versions''' |
||
+ | == Compatibility with older GHC == |
||
− | How do I configure Cabal to use different GHC options depending on GHC version? |
||
− | E.g. using -fno-warn-unused-bind is convenient for certain GHC versions, but breaks compatibility with older ones. |
||
+ | 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: |
||
− | (This is a stub, since the previous version was so out-of-date. Please help by adding useful content.) |
||
+ | <pre> |
||
+ | if impl(ghc >= 6.12) |
||
+ | 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:
- Migration Guide; this page provides information to help migrating between major GHC releases.
- 2.2 migration guide; updating for Cabal 2.2
- What's new in Cabal/cabal-install 2.0 — improved new-build, Backpack, foreign libraries and more! (blog article)
- 2.0 migration guide; updating for Cabal 2.0
- /Updating to GHC 7
- /Updating to GHC 6.10
- /Updating to GHC 6.8
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