Personal tools

Upgrading packages/Updating to GHC 7

From HaskellWiki

< Upgrading packages(Difference between revisions)
Jump to: navigation, search
Line 25: Line 25:
  
 
Quasiquoter invocation no longer requires/allows a leading dollar sign.
 
Quasiquoter invocation no longer requires/allows a leading dollar sign.
 
== 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 was the current version in hackage when this was written.
 
  
 
== Required library versions ==
 
== Required library versions ==

Revision as of 17:18, 29 October 2010

A list of common problems upgrading packages to GHC 7.

If you maintain packages, this is for you.

Contents

1 -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:

2 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.

3 -fglasgow-exts is deprecated

-fglasgow-exts is deprecated, and enables fewer extensions than in previous releases. Use individual language flags (or better yet, pragmas) instead.

4 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.

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

Quasiquoter invocation no longer requires/allows a leading dollar sign.

6 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