[GHC] #14109: GHC matches -- as a varsym when lexing a qvarsym
GHC
ghc-devs at haskell.org
Sat Aug 12 14:24:01 UTC 2017
#14109: GHC matches -- as a varsym when lexing a qvarsym
-------------------------------------+-------------------------------------
Reporter: glguy | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.2.1
(Parser) |
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: Other
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
GHC seems only to exclude the line comment marker `--` when lexing a
varsym and not a qvarsym.
This can be observed in the following code
{{{
module Demo where
x Demo.-- y = (x,y)
}}}
Generating this surprising error message
{{{
/Users/emertens/Desktop/Demo.hs:3:3: error:
Qualified name in binding position: Demo.--
}}}
and excludes this definition perhaps?
{{{
example f = Just.-- comment
f
}}}
Which might either have lexed as `Just` `.` `-- comment`, or it might have
lexed as `Just.-` `-`, but it probably shouldn't be the case that it's a
qvarsym.
At a minimum, the Haskell Report specifically excludes `--` from the
varsym rule, so it can't support the qvarsym rule match that it is now.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14109>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list