[GHC] #1215: GHC fails to respect the maximal munch rule while
lexing "qualified reservedids"
GHC
trac at galois.com
Sun Mar 11 17:41:32 EDT 2007
#1215: GHC fails to respect the maximal munch rule while lexing "qualified
reservedids"
-------------------------------------------------+--------------------------
Reporter: Stefan O'Rear <stefanor at cox.net> | Owner:
Type: bug | Status: new
Priority: low | Milestone:
Component: Compiler (Parser) | Version: 6.6
Severity: normal | Keywords:
Difficulty: Unknown | Testcase:
Architecture: Unknown | Os: Unknown
-------------------------------------------------+--------------------------
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.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1215>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list