[GHC] #10998: Parser should suggest -XMagicHash

GHC ghc-devs at haskell.org
Wed Oct 21 13:33:19 UTC 2015


#10998: Parser should suggest -XMagicHash
-------------------------------------+-------------------------------------
           Reporter:  osa1           |             Owner:
               Type:  bug            |            Status:  new
           Priority:  low            |         Milestone:
          Component:  Compiler       |           Version:  7.10.2
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 When using GHCi, this is leading to a weird situation where GHCi is
 actually suggesting an identifier with `#` in it, but also rejecting when
 you actually type it:

 {{{
 ➜  ~  ghc-stage2 --interactive
 GHCi, version 7.11.20151016: http://www.haskell.org/ghc/  :? for help
 λ:1> :m + GHC.Prim
 λ:2> :t unsafe
 unsafeCoerce#            unsafeFreezeArrayArray#  unsafeFreezeSmallArray#
 unsafeThawSmallArray#
 unsafeFreezeArray#       unsafeFreezeByteArray#   unsafeThawArray#
 λ:2> :t unsafeCoerce#

 <interactive>:1:14: error:
     parse error (possibly incorrect indentation or mismatched brackets)
 λ:3> :set -XMagicHash
 λ:4> :t unsafeCoerce#
 unsafeCoerce# :: a -> b
 }}}

 (also tried with 7.10)

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


More information about the ghc-tickets mailing list