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

From HaskellWiki
Jump to: navigation, search
 
(Quasiquotation: [$foo|...|] -> [foo|...|])
 
(10 intermediate revisions by 5 users not shown)
Line 5: Line 5:
 
== -XMonoLocalBinds ==
 
== -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
+
If you use -XGADTs or -XTypeFamilies you get -XMonoLocalBinds, which says that local let/where bindings are not auto-generalised. There's a blog post that explains the change, and what do to about it:
 
* http://haskell.org/haskellwiki/Simonpj/Talk:OutsideIn
 
   
  +
* http://hackage.haskell.org/trac/ghc/blog/LetGeneralisationInGhc7
   
 
== base 3 goes away ==
 
== 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.
 
There is no base 3 now, after being deprecated for several years, so dependencies on base 3 won't compile with GHC 7.
  +
  +
== -fglasgow-exts is deprecated ==
  +
  +
-fglasgow-exts is deprecated, and no longer enables GADTs or TypeFamilies. Use individual language flags (or better yet, pragmas) instead.
  +
  +
== 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.
  +
  +
== Quasiquotation: [$foo|...|] -> [foo|...|] ==
  +
  +
Quasiquoter invocation no longer requires a leading dollar sign. The leading dollar is now allowed, but deprecated.
  +
  +
== Required library versions ==
  +
  +
A list of libraries and their earliest (known) GHC 7 ready version:
  +
  +
* network >= 2.2.1.8
  +
* mtl >= 1.1.1.0
  +
* quickcheck >= 2.3.0.2
  +
* stringsearch >= 0.3.2

Latest revision as of 00:34, 2 December 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 you get -XMonoLocalBinds, which says that local let/where bindings are not auto-generalised. There's a blog post that explains the change, and what do to about it:

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.

-fglasgow-exts is deprecated

-fglasgow-exts is deprecated, and no longer enables GADTs or TypeFamilies. Use individual language flags (or better yet, pragmas) instead.

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.

Quasiquotation: [$foo|...|] -> [foo|...|]

Quasiquoter invocation no longer requires a leading dollar sign. The leading dollar is now allowed, but deprecated.

Required library versions

A list of libraries and their earliest (known) GHC 7 ready version:

  • network >= 2.2.1.8
  • mtl >= 1.1.1.0
  • quickcheck >= 2.3.0.2
  • stringsearch >= 0.3.2