[GHC] #14109: GHC matches -- as a varsym when lexing a qvarsym

GHC ghc-devs at haskell.org
Fri Oct 20 05:10:52 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)                           |
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  Other             |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by harpocrates):

 It looks like the lexer does absolutely no validation for anything that is
 qualified. Things like `Prelude.|`, `Prelude.->`, `Prelude.data`, etc. all
 make it all the way through to the renamer.

 Most of these should (according to the report) probably lex as 3 or more
 separate tokens. Alternatively (and I prefer this), we could just report a
 lexer error. The functions for validating qualified symbols, constructors,
 etc. are already defined in `basicTypes/Lexeme.hs`, so there isn't a much
 work to be done here.

 I'm also volunteering to implement either of these options. :)

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14109#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list