[project @ 2002-02-12 03:52:08 by chak]
authorchak <unknown>
Tue, 12 Feb 2002 03:52:09 +0000 (03:52 +0000)
committerchak <unknown>
Tue, 12 Feb 2002 03:52:09 +0000 (03:52 +0000)
commit2f874c4c1d0cc861a8f72585a3e6f9673105b766
treea0f2a1e9975aa266dc3907cca37274970ec911f0
parent704677752d93b93bdcef5bf146e37d6a7dc4f611
[project @ 2002-02-12 03:52:08 by chak]
This fixes a problem with the recent clean up in the parsing of type
declarations.  The cleaned up version was correct by H98 (I think), but
unfortunately won't compile the Prelude anymore.

I made the definition a little bit more liberal as follows:
- In `tycl_hdr' allow `gtycon' instead of just `tycon' for the defined type
  constructor.  This allows beyond H98 special syntax like "[]" etc as well as
  tycon ops in parenthesis.  Moreover, it allows qualified names, but the
  renamer flags the latter as errors.
- Allow `gtycon' instead of only `qtycon' for the class name in definitions of
  the form `Eq a => T a' to avoid a whole list of s/r conflicts.  (I have *not*
  checked that the renamer flags misuse, but I would expect that it does.)

ToDo: I think, the renamer should raise an error for all these additional
      forms *unless* -fglasgow-exts is given.

In PrelBase, I needed to replace the infix notation by prefix notation in the
definition of `:+:' and `:*:'.
ghc/compiler/parser/Parser.y
ghc/lib/std/PrelBase.lhs