[GHC] #15284: Can't parse ''(*) in GHC HEAD

GHC ghc-devs at haskell.org
Sun Jun 17 21:45:18 UTC 2018


#15284: Can't parse ''(*) in GHC HEAD
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:  (none)
            Type:  bug               |               Status:  closed
        Priority:  highest           |            Milestone:  8.6.1
       Component:  Compiler          |              Version:  8.5
  (Parser)                           |
      Resolution:  invalid           |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by int-index):

 * status:  new => closed
 * resolution:   => invalid


Comment:

 Now that I thought a bit more about it, the current error is the correct
 behavior:

 {{{
 Prelude> ''*

 <interactive>:4:1: error:
     Parser error on `''`
     Character literals may not be empty
     Or perhaps you intended to use quotation syntax of TemplateHaskell,
     but the type variable or constructor is missing
 }}}

 After all, `*` is not a name, it is built-in syntax. There's no
 corresponding name. If we simply treated it as `GHC.Types.Type` here, then
 we couldn't distinguish between `''Type` and `''*`, meaning we'd lose the
 parse/pretty-print roundtrip property.

 Thus I'm closing as "invalid". Reopen if you disagree.

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


More information about the ghc-tickets mailing list