RE: GHC-problem with parsing infix type synonyms - bug?

On 16 February 2005 14:41, Johan Glimming wrote:
I read from the type-extensions.html part of the GHC 6.2 manual:
"After expanding type synonyms, GHC does validity checking on types, looking for the following mal-formedness which isn't detected simply by kind checking: ... Partially-applied type synonym."
However, when entering:
infix 9 :-+-: type (f :-+-: g) t o1 o2 = Either (f t o1 o2) (g t o1 o2)
or simpler variations e.g. without brackets, except where no arguments are present after (f :-+-: g), I get parse errors (yes, _parse_) on this very line.
Also, the above works for data, and the "lexical syntax is the same as that for data constructors" [someone had read this somewhere].
I think the syntax used in your type synonym declaration isn't supported at the moment. For consistency it probably should be. Cheers, Simon

I think the syntax used in your type synonym declaration isn't supported at the moment. For consistency it probably should be.
Is there any chance to fix this in the next 6.4 release, or can I patch 6.4 myself? (I'd need hints though.) I have some code in a project for which I want to use type synonyms for instead of data type definitions, to save on all the constructor names hanging around. Johan Glimming.
participants (2)
-
Johan Glimming
-
Simon Marlow