GHC panic, `tcTyVarDetails` is missing a case
Compiling the attached module I get
$ ghc --interactive Tree.hs
GHCi, version 8.1.20161030: http://www.haskell.org/ghc/ :? for help
[1 of 1] Compiling Tree ( Tree.hs, interpreted )
Tree.hs:28:63: error:ghc-stage2: panic! (the 'impossible' happened)
(GHC version 8.1.20161030 for x86_64-apple-darwin):
tcTyVarDetails
cobox0_a1eK :: (m_a1ej[sk:2] :: Peano)
~#
('S n_a1eJ[ssk:3] :: Peano)
Call stack:
CallStack (from HasCallStack):
prettyCurrentCallStack, called at compiler/utils/Outputable.hs:1076:58 in ghc:Outputable
callStackDoc, called at compiler/utils/Outputable.hs:1080:37 in ghc:Outputable
pprPanic, called at compiler/basicTypes/Var.hs:457:22 in ghc:Var
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
When switching the call to SBranchX
in line 29 to a call to SBranch
the program compiles. So I suspect that the problem is rooted in the extra constraint attached to constructor SBranchX
.
Trac metadata
Trac field | Value |
---|---|
Version | 8.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |