GHC-problem with parsing infix type synonyms - bug?

Johan Glimming glimming at
Wed Feb 16 09:41:28 EST 2005


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].

Best Wishes,
Johan Glimming

More information about the Glasgow-haskell-users mailing list