Skip to content

Levity polymorphism panic in GHCi

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
Trac metadata
Trac field Value
Version 8.0.1
Type Bug
TypeOfFailure OtherFailure
Priority high
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC goldfire
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information