GHC panic with (->) generalization branch while compiling lens
While characterizing the performance impact of the Typeable
branch (wip/ttypeable
) against Hackage packages I have found that lens
manages to break the (->)
kind-generalization patch. Specifically, TcCanonical.can_eq_nc
induces a panic by tcRepSplitTyApp_maybe
during compilation of Control.Lens.Traversal.holesOf
,
ghc-stage2: panic! (the 'impossible' happened)
(GHC version 8.1.20170207 for x86_64-unknown-linux):
tcRepSplitTyConApp_maybe
([] |> <*>_N ->_N Sym {alzj}) a_alzd[tau:5]
c_alzb[tau:5]
Call stack:
CallStack (from HasCallStack):
prettyCurrentCallStack, called at compiler/utils/Outputable.hs:1188:58 in ghc:Outputable
callStackDoc, called at compiler/utils/Outputable.hs:1192:37 in ghc:Outputable
pprPanic, called at compiler/typecheck/TcType.hs:1456:5 in ghc:TcType
tcRepSplitTyConApp_maybe, called at compiler/typecheck/TcCanonical.hs:617:25 in ghc:TcCanonical
The last thing emitted by tc-trace is,
can_eq_nc
False
[WD] hole{alyP} {0}:: (p_alyn[tau:5] :: TYPE p_alym[tau:5])
GHC.Prim.~#
(cat_alyK[tau:6] b_alyM[tau:6] c_alyN[tau:6] :: *)
nominal equality
([] |> <*>_N ->_N Sym {alzj}) a_alzd[tau:5] -> c_alzb[tau:5]
p_alyn[tau:5]
cat_alyK[tau:6] b_alyM[tau:6] c_alyN[tau:6]
cat_alyK[tau:6] b_alyM[tau:6] c_alyN[tau:6]