[GHC] #13959: substTyVar's definition is highly dubious
GHC
ghc-devs at haskell.org
Wed Jul 12 23:35:51 UTC 2017
#13959: substTyVar's definition is highly dubious
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by RyanGlScott):
Here's a much more detailed stack trace when compiling
`Data.Type.Equality`:
{{{
$ inplace/bin/ghc-stage2 -fforce-recomp -O2 -DDEBUG -dcore-lint Bug.hs
[1 of 1] Compiling Data.Type.Equality ( Bug.hs, Bug.o )
ghc-stage2: panic! (the 'impossible' happened)
(GHC version 8.3.20170712 for x86_64-unknown-linux):
ASSERT failed!
in_scope InScope {k1_X49O a_X49V b_X49X}
tenv [X49T :-> k1_X49O, X49V :-> a_X49V, X49X :-> b_X49X]
tenvFVs [X49M :-> k2_X49M, X49O :-> k1_X49O, X49V :-> a_X49V,
X49X :-> b_X49X]
cenv []
cenvFVs []
tys [*]
cos []
Call stack:
CallStack (from HasCallStack):
prettyCurrentCallStack, called at
compiler/utils/Outputable.hs:1133:58 in ghc:Outputable
callStackDoc, called at compiler/utils/Outputable.hs:1188:22 in
ghc:Outputable
assertPprPanic, called at compiler/types/TyCoRep.hs:2089:56 in
ghc:TyCoRep
checkValidSubst, called at compiler/types/TyCoRep.hs:2122:29 in
ghc:TyCoRep
substTy, called at compiler/types/TyCoRep.hs:2198:44 in
ghc:TyCoRep
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/utils/Outputable.hs:1186:5 in
ghc:Outputable
assertPprPanic, called at compiler/types/TyCoRep.hs:2089:56 in
ghc:TyCoRep
checkValidSubst, called at compiler/types/TyCoRep.hs:2122:29 in
ghc:TyCoRep
substTy, called at compiler/types/TyCoRep.hs:2198:44 in
ghc:TyCoRep
CallStack (from -prof):
Panic.panic (compiler/utils/Panic.hs:(182,1)-(186,68))
Outputable.pprDebugAndThen
(compiler/utils/Outputable.hs:(1191,1)-(1194,43))
ErrUtils.prettyPrintGhcErrors.\
(compiler/main/ErrUtils.hs:(658,23)-(666,44))
GhcMonad.gcatch.\.\ (compiler/main/GhcMonad.hs:117:46-63)
Panic.throwGhcException (compiler/utils/Panic.hs:171:1-35)
Panic.panicDoc (compiler/utils/Panic.hs:192:1-61)
Outputable.pprPanic (compiler/utils/Outputable.hs:1137:1-49)
Outputable.assertPprPanic
(compiler/utils/Outputable.hs:(1185,1)-(1188,35))
TyCoRep.checkValidSubst (compiler/types/TyCoRep.hs:(2088,1)-(2113,57))
TyCoRep.substTy (compiler/types/TyCoRep.hs:(2120,1)-(2123,45))
Var.updateTyVarKind (compiler/basicTypes/Var.hs:456:1-64)
TyCoRep.substTyVar (compiler/types/TyCoRep.hs:(2194,1)-(2198,61))
TyCoRep.subst_ty.go (compiler/types/TyCoRep.hs:(2176,5)-(2191,60))
TyCoRep.subst_ty (compiler/types/TyCoRep.hs:(2173,1)-(2191,60))
TyCoRep.subst_co.go_ty (compiler/types/TyCoRep.hs:2240:5-26)
TyCoRep.subst_co.go (compiler/types/TyCoRep.hs:(2243,5)-(2264,66))
TyCoRep.subst_co (compiler/types/TyCoRep.hs:(2236,1)-(2270,36))
TyCoRep.substCoUnchecked (compiler/types/TyCoRep.hs:(2223,1)-(2225,33))
TyCoRep.substCoWithUnchecked
(compiler/types/TyCoRep.hs:(2045,1)-(2047,41))
Coercion.mkInstCo (compiler/types/Coercion.hs:(950,1)-(952,31))
CoreOpt.pushCoTyArg.co2 (compiler/coreSyn/CoreOpt.hs:1012:5-62)
CoreOpt.pushCoTyArg (compiler/coreSyn/CoreOpt.hs:(990,1)-(1012,62))
Simplify.simplCast.addCoerce
(compiler/simplCore/Simplify.hs:(1427,8)-(1461,53))
Simplify.simplCast (compiler/simplCore/Simplify.hs:(1421,1)-(1461,53))
Simplify.rebuildCall (compiler/simplCore/Simplify.hs:(1761,1)-(1853,47))
Simplify.completeCall
(compiler/simplCore/Simplify.hs:(1718,1)-(1749,60))
Simplify.simplIdF (compiler/simplCore/Simplify.hs:(1680,1)-(1712,53))
Simplify.simplExprC (compiler/simplCore/Simplify.hs:(1035,1)-(1041,42))
Simplify.simplExpr (compiler/simplCore/Simplify.hs:(1018,1)-(1026,45))
Simplify.simplLam (compiler/simplCore/Simplify.hs:(1501,1)-(1538,37))
Simplify.simplExprF1 (compiler/simplCore/Simplify.hs:(1064,1)-(1140,52))
Simplify.simplExprF (compiler/simplCore/Simplify.hs:(1049,1)-(1059,26))
Simplify.simplLazyBind (compiler/simplCore/Simplify.hs:(381,1)-(432,68))
Simplify.simplBind (compiler/simplCore/Simplify.hs:(362,1)-(368,58))
Simplify.simplRecOrTopPair.trace_bind
(compiler/simplCore/Simplify.hs:(330,5)-(334,56))
Simplify.simplRecOrTopPair
(compiler/simplCore/Simplify.hs:(321,1)-(334,56))
Simplify.simplTopBinds.simpl_bind
(compiler/simplCore/Simplify.hs:(268,5)-(272,65))
Simplify.simplTopBinds.simpl_binds
(compiler/simplCore/Simplify.hs:(264,5)-(266,64))
Simplify.simplTopBinds (compiler/simplCore/Simplify.hs:(248,1)-(272,65))
SimplCore.SimplTopBinds (compiler/simplCore/SimplCore.hs:758:29-64)
SimplMonad.initSmpl (compiler/simplCore/SimplMonad.hs:(72,1)-(78,36))
SimplCore.simplifyPgmIO.do_iteration
(compiler/simplCore/SimplCore.hs:(691,5)-(798,48))
SimplCore.simplifyPgmIO
(compiler/simplCore/SimplCore.hs:(658,1)-(800,47))
IOEnv.liftIO (compiler/utils/IOEnv.hs:188:5-33)
CoreMonad.liftIO (compiler/simplCore/CoreMonad.hs:615:5-37)
CoreMonad.liftIOWithCount (compiler/simplCore/CoreMonad.hs:619:1-87)
SimplCore.simplifyPgm (compiler/simplCore/SimplCore.hs:(644,1)-(649,48))
SimplCore.Simplify (compiler/simplCore/SimplCore.hs:456:40-55)
SimplCore.doCorePass (compiler/simplCore/SimplCore.hs:(455,1)-(500,50))
SimplCore.runCorePasses.do_pass
(compiler/simplCore/SimplCore.hs:(442,5)-(450,28))
SimplCore.runCorePasses
(compiler/simplCore/SimplCore.hs:(439,1)-(452,24))
IOEnv.thenM.\ (compiler/utils/IOEnv.hs:(83,37)-(84,60))
IOEnv.thenM (compiler/utils/IOEnv.hs:(83,1)-(84,61))
CoreMonad.>>=.\ (compiler/simplCore/CoreMonad.hs:(524,30)-(528,38))
CoreMonad.>>= (compiler/simplCore/CoreMonad.hs:(524,5)-(528,38))
IOEnv.runIOEnv (compiler/utils/IOEnv.hs:127:1-30)
CoreMonad.runCoreM (compiler/simplCore/CoreMonad.hs:(565,1)-(581,63))
SimplCore.core2core (compiler/simplCore/SimplCore.hs:(75,1)-(99,54))
HscTypes.liftIO.\ (compiler/main/HscTypes.hs:245:31-55)
HscTypes.liftIO (compiler/main/HscTypes.hs:245:5-55)
HscMain.Core2Core (compiler/main/HscMain.hs:1173:7-42)
HscMain.hscSimplify' (compiler/main/HscMain.hs:(1170,1)-(1173,42))
HscMain.finish (compiler/main/HscMain.hs:(702,1)-(740,70))
HscTypes.>>=.\ (compiler/main/HscTypes.hs:(240,33)-(242,56))
HscTypes.>>= (compiler/main/HscTypes.hs:(240,5)-(242,56))
HscTypes.runHsc (compiler/main/HscTypes.hs:(251,1)-(254,12))
HscMain.hscIncrementalCompile
(compiler/main/HscMain.hs:(644,1)-(690,60))
DriverPipeline.compileOne'
(compiler/main/DriverPipeline.hs:(134,1)-(289,55))
GhcMake.upsweep_mod.compile_it_discard_iface
(compiler/main/GhcMake.hs:(1436,13)-(1438,61))
GhcMake.upsweep_mod (compiler/main/GhcMake.hs:(1376,1)-(1532,49))
GhcMonad.liftIO (compiler/main/GhcMonad.hs:110:3-30)
GhcMake.upsweep.upsweep' (compiler/main/GhcMake.hs:(1245,3)-(1344,91))
GhcMake.upsweep (compiler/main/GhcMake.hs:(1237,1)-(1344,91))
GhcMake.load'.upsweep_fn (compiler/main/GhcMake.hs:(389,9)-(390,41))
GhcMake.load' (compiler/main/GhcMake.hs:(242,1)-(490,38))
GhcMake.load (compiler/main/GhcMake.hs:(234,1)-(236,44))
Main.doMake (ghc/Main.hs:(695,1)-(720,13))
GhcMonad.gcatch.\ (compiler/main/GhcMonad.hs:117:19-63)
GhcMonad.gcatch (compiler/main/GhcMonad.hs:(116,3)-(117,63))
ErrUtils.prettyPrintGhcErrors
(compiler/main/ErrUtils.hs:(657,1)-(666,44))
Main.main' (ghc/Main.hs:(154,1)-(258,33))
GhcMonad.gmask.\.\.g_restore.\ (compiler/main/GhcMonad.hs:121:65-80)
GhcMonad.gmask.\.\.g_restore (compiler/main/GhcMonad.hs:121:33-80)
GhcMonad.gmask.\.\ (compiler/main/GhcMonad.hs:(120,30)-(123,53))
Exception.gmask.\ (compiler/utils/Exception.hs:64:27-29)
Exception.gmask (compiler/utils/Exception.hs:64:3-30)
GhcMonad.gmask.\ (compiler/main/GhcMonad.hs:(119,19)-(123,53))
GhcMonad.gmask (compiler/main/GhcMonad.hs:(118,3)-(123,53))
Exception.gfinally (compiler/utils/Exception.hs:(56,3)-(60,14))
GhcMonad.>>=.\ (compiler/main/GhcMonad.hs:107:26-57)
GhcMonad.>>= (compiler/main/GhcMonad.hs:107:3-57)
Panic.withSignalHandlers (compiler/utils/Panic.hs:(240,1)-(298,37))
GHC.runGhc (compiler/main/GHC.hs:(440,1)-(445,26))
Exception.gcatch (compiler/utils/Exception.hs:63:3-37)
Exception.ghandle (compiler/utils/Exception.hs:73:1-21)
GHC.defaultErrorHandler (compiler/main/GHC.hs:(380,1)-(412,7))
Main.main (ghc/Main.hs:(90,1)-(150,64))
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13959#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list