Ticket #1215 (closed bug: fixed)
GHC fails to respect the maximal munch rule while lexing "qualified reservedids"
|Reported by:||Stefan O'Rear <stefanor@…>||Owned by:||simonmar|
|Type of failure:||Difficulty:||Easy (less than 1 hour)|
|Test Case:||Blocked By:|
The following program I believe is legal haskell 98:
module Main where t = 2 defaul _ = return () main = Main.default
since Main.default is an illegal lexeme, but Main.defaul is a perfectly good qvarid. however ghci rejects it:
Bar.hs:5:12: parse error on input `default'
Something very similar to this is documented, but only in the qvarsym case. This appears fairly easy to fix using extra rules in the lexer; a flex lexer that does what I consider correct can be found at http://members.cox.net/stefanor/h98lexer.l.