Fix Trac #3265: type operators in type/class declarations
authorsimonpj@microsoft.com <unknown>
Tue, 2 Jun 2009 13:37:06 +0000 (13:37 +0000)
committersimonpj@microsoft.com <unknown>
Tue, 2 Jun 2009 13:37:06 +0000 (13:37 +0000)
commit0a7a51d7faab28b2bc1aa5998ed36e9f60ecb1e5
treeddf93cde9fbfcda623a71f07eb97417bcb00b3f3
parent22c42ec32752ea67b5071df32fd9997a3f4d7346
Fix Trac #3265: type operators in type/class declarations

We should accept these:

   data a :*: b = ....
or
   data (:*:) a b = ...

only if -XTypeOperators is in force.  And similarly class decls.

This patch fixes the problem.  It uses the slightly-nasty OccName.isSymOcc,
but the only way to avoid that is to cach the result in OccNames which seems
overkill to us.
compiler/rename/RnEnv.lhs