[GHC] #13202: Levity polymorphism panic in GHCi

GHC ghc-devs at haskell.org
Sat Jan 28 16:47:26 UTC 2017


#13202: Levity polymorphism panic in GHCi
-------------------------------------+-------------------------------------
           Reporter:  bgamari        |             Owner:
               Type:  bug            |            Status:  new
           Priority:  high           |         Milestone:  8.2.1
          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:
-------------------------------------+-------------------------------------
 With current `master`,
 {{{
 $ ghci
 GHCi, version 8.1.20170126: http://www.haskell.org/ghc/  :? for help
 Loaded GHCi configuration from /home/ben/.ghci
 λ> import GHC.Exts
 λ> :set -XTypeApplications -XMagicHash -XTypeInType
 λ> data TypeRep (a :: k) = TypeRep
 λ> let typeRepKind = undefined :: TypeRep (a :: k) -> TypeRep k
 λ> let typeRep = undefined :: TypeRep (a :: k)
 λ> let x = typeRepKind (typeRep @(Maybe Int#))
 ghc: panic! (the 'impossible' happened)
   (GHC version 8.1.20170126 for x86_64-unknown-linux):
         isUnliftedType
   forall (a :: TYPE q). a :: TYPE q
   Call stack:
       CallStack (from HasCallStack):
         prettyCurrentCallStack, called at
 compiler/utils/Outputable.hs:1166:58 in ghc:Outputable
         callStackDoc, called at compiler/utils/Outputable.hs:1170:37 in
 ghc:Outputable
         pprPanic, called at compiler/types/Type.hs:1869:10 in ghc:Type

 Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
 }}}

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


More information about the ghc-tickets mailing list