[GHC] #10998: Parser should suggest -XMagicHash

GHC ghc-devs at haskell.org
Mon Oct 26 12:54:15 UTC 2015


#10998: Parser should suggest -XMagicHash
-------------------------------------+-------------------------------------
        Reporter:  osa1              |                Owner:
            Type:  bug               |               Status:  new
        Priority:  low               |            Milestone:
       Component:  Compiler          |              Version:  7.10.2
  (Parser)                           |
      Resolution:                    |             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:                    |
-------------------------------------+-------------------------------------

Comment (by rwbarton):

 Probably rather more common is the case `unsafeCoerce# foo`, and now this
 is not a parse error but rather an out-of-scope variable error (for both
 `unsafeCoerce` and `#`). Would be nice to catch this case too, perhaps by
 checking, when raising an out-of-scope error for `#`, whether it
 immediately follows a letter-type identifier?

 Also be sure not to suggest `-XMagicHash` if it is on already (e.g. `:t
 foo #`).

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


More information about the ghc-tickets mailing list