[GHC] #12128: ghci cause panic on 8.0.1

GHC ghc-devs at haskell.org
Sun May 29 02:43:45 UTC 2016


#12128: ghci cause panic on 8.0.1
-------------------------------------+-------------------------------------
           Reporter:  zxtx           |             Owner:
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.0.1
           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:
-------------------------------------+-------------------------------------
 The following code panics when called with ghci:

 {{{#!hs
 module Foo where

 import GHC.TypeLits (Symbol)
 import Unsafe.Coerce

 instance Read Symbol where
     readsPrec = unsafeCoerce (readsPrec :: Int -> ReadS String)

 data Bar = TyCon !Symbol deriving (Read)
 }}}

 {{{
 % ghci foo.hs
 GHCi, version 8.0.1: http://www.haskell.org/ghc/  :? for help
 Loaded GHCi configuration from /home/zv/.ghc/ghci.conf
 [1 of 1] Compiling Foo              ( foo.hs, interpreted )
 ghc: panic! (the 'impossible' happened)
   (GHC version 8.0.1 for x86_64-unknown-linux):
         atomPrimRep case a1_s2AG of _ [Occ=Dead] { }
 }}}

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


More information about the ghc-tickets mailing list