GHC-problem with parsing infix type synonyms - bug?

Simon Marlow simonmar at microsoft.com
Thu Feb 17 04:40:41 EST 2005


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


More information about the Glasgow-haskell-users mailing list