Panic with repSplitAppTys
I get a GHC panic while compiling a rather large module that contains a fairly simple function:
import Control.Monad.Reader
usingReader ::
(Monad m) =>
r ->
(a -> ReaderT r m b)
(a -> m b)
usingReader r f = flip runReaderT r . f
Unfortunately, that function alone in a module does not trigger the panic. The error message is:
ghc: panic! (the 'impossible' happened)
(GHC version 8.2.1 for x86_64-unknown-linux):
repSplitAppTys
a_ahFs[sk:1]
ReaderT r_ahFr[sk:1] m_ahFq[sk:1] b_ahFt[sk:1]
[]
Call stack:
CallStack (from HasCallStack):
prettyCurrentCallStack, called at compiler/utils Outputable.hs:1133:58 in ghc:Outputable
callStackDoc, called at compiler/utils/Outputable.hs:1137:37 in ghc:Outputable
pprPanic, called at compiler/types/Type.hs:808:9 in ghc:Type
Trac metadata
Trac field | Value |
---|---|
Version | 8.2.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |