GHC 6.4 release candidates available

Malcolm Wallace Malcolm.Wallace at
Fri Feb 11 11:42:28 EST 2005

> Please test if you're able to, and give us feedback.

It looks like GADTs (or something else new) conflict with normal
Haskell'98 type inference.  The following example used to compile
just fine with all previous versions of ghc and nhc98.

  $ ghc-6.4.20050210   -package lang    -c  -o Parse.o Parse.hs

    Couldn't match the rigid variable `a' against the rigid variable `a1'
      `a' is bound by the type signature for `parseValdef'
      `a1' is bound by the type signature for `parseWhere'
      Expected type: Parser (Decls TokenId) [PosToken] a1
      Inferred type: Parser (Decls TokenId)
                            [(Pos, Lex, Lexical.LexState, [LexPre.PosTokenPre])]                            a
    In the expression:
        ((((lit L_where) `revChk` lcurl) `revChk` parseDecls) `chk` rcurl)
        `orelse` (parse (DeclsParse []))
    In the definition of `parseWhere':
        parseWhere = ((((lit L_where) `revChk` lcurl) `revChk` parseDecls) `chk` rcurl)
                     `orelse` (parse (DeclsParse []))

The quoted expressions look a little bit hairy, but if you examine
the explicit type signatures in question, it is very clear that there
should be no error here.  To reproduce the bug, just build the nhc98
compiler proper.

    $ wget
    $ tar zxf nhc98src-1.17.tar.gz
    $ ./configure --buildwith=ghc-6.4.20050210
    $ make basic


More information about the Glasgow-haskell-users mailing list