Difference between revisions of "Upgrading packages/Updating to GHC 7"

From HaskellWiki
Jump to: navigation, search
(qq)
Line 16: Line 16:
 
== Quasiquotation data constructor modified ==
 
== Quasiquotation data constructor modified ==
 
The QuasiQuoter constructor now takes four arguments instead of 2. (quoteType and quoteDec were added). One solution: use record syntax to set only the quoters you provide. This allows code to remain backwards compatible.
 
The QuasiQuoter constructor now takes four arguments instead of 2. (quoteType and quoteDec were added). One solution: use record syntax to set only the quoters you provide. This allows code to remain backwards compatible.
  +
  +
== The binary library shipped with the compiler is renamed ghc-binary ==
  +
  +
If your package expects to see binary, the correct thing is to build and install an external version. However, you will need a version newer than 0.5.0.2, which is, when this was written, the current version in hackage.

Revision as of 14:42, 29 September 2010

A list of common problems upgrading packages to GHC 7.

If you maintain packages, this is for you.

-XMonoLocalBinds

If you use -XGADTs or -XTypeFamilies (or -fglasgow-exts, which is deprecated) you get -XMonoLocalBinds, which says that local let/where bindings are not auto-generalised. There's an extensive discussion of the reason for this decision in our paper "Let should not be generalised" and the journal version

* http://haskell.org/haskellwiki/Simonpj/Talk:OutsideIn


base 3 goes away

There is no base 3 now, after being deprecated for several years, so dependencies on base 3 won't compile with GHC 7.

Quasiquotation data constructor modified

The QuasiQuoter constructor now takes four arguments instead of 2. (quoteType and quoteDec were added). One solution: use record syntax to set only the quoters you provide. This allows code to remain backwards compatible.

The binary library shipped with the compiler is renamed ghc-binary

If your package expects to see binary, the correct thing is to build and install an external version. However, you will need a version newer than 0.5.0.2, which is, when this was written, the current version in hackage.