Levity polymorphism-related GHC panic: expectJust zonkTcTyVarToVar
Reproducible with GHC 8.0.2 and HEAD:
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeInType #-}
module Bug where
import GHC.Exts
type Bad = forall (v1 :: RuntimeRep) (a1 :: TYPE v). a1
[1 of 1] Compiling Bug ( Bug.hs, Bug.o )
ghc-stage2: panic! (the 'impossible' happened)
(GHC version 8.1.20170223 for x86_64-unknown-linux):
expectJust zonkTcTyVarToVar
CallStack (from HasCallStack):
error, called at compiler/utils/Maybes.hs:53:27 in ghc:Maybes
expectJust, called at compiler/typecheck/TcType.hs:1576:21 in ghc:TcType
Trac metadata
Trac field | Value |
---|---|
Version | 8.0.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler (Type checker) |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |