
I might have done something wrong, but... -- I defined infix 5 # the sharp character is accepted, the definition of the associated procedure as well, the usage a # b works. Apparently the form (#) is considered illegal. It works on my Linux. On Win2000: parse error on input ')' Have you ever seen that? Thank you. Jerzy Karczmarczuk

On Mon, Dec 16, 2002 at 01:26:31PM +0100, Jerzy Karczmarczuk wrote:
Apparently the form (#) is considered illegal. It works on my Linux. On Win2000: parse error on input ')'
You don't happen to use -fglasgow-exts on windows? That gives parse error on the sequence "(#" I guess it's related to unboxed tuples using that notation.. I've also found this a bit annoying, is it fixable? /Peter

Jerzy Karczmarczuk wrote:
Apparently the form (#) is considered illegal. It works on my Linux.
On Win2000: parse error on input ')'
(#) is legal Haskell 98, but it is illegal in GHC when -fglasgow-exts is on. It should have nothing to do with the platform. Thre reason is that GHC uses the syntax (# a, b #) for unboxed tuples. When GHC's language extensions are enabled, GHC parses '(#)' as '(#' and ')', which doesn't make sense. Solutions: 1) switch off the language extensions 2) use spaces around the hash: write ( # ) instead. Cheers, Wolfgang Thaller
participants (3)
-
Jerzy Karczmarczuk
-
Peter Strand
-
Wolfgang Thaller