
YHC's parser seems to die on the following (I think) valid Haskell identifiers:
main = let _1 = 1 in print _1
Underscores and upper/lower case are broken in Haskell, if anyone can tell us what it _should_ do then we're happy to implement it! Ideally a short and comprehensible spec of what we should allow, and what the result should be, to accept the maximum number of programs!
FWIW, this same bug was fixed in nhc98 nearly two years ago... You are welcome to find and steal the patch. Tue Jun 14 11:25:53 BST 2005 malcolm * Fix lexical error (masquerading as a parse error) with an underscore pattern e.g. "f _2a", when the -underscore flag is off (the default). Because the character following the underscore is neither lower nor upper, nhc98's special treatment (ignore the underscore in deciding whether it is a conid or varid) does not apply. Thus, drop through to the standard H'98 behaviour of underscore=lowercase, therefore a varid. Regards, Malcolm