#2366: ASSERT failed! file typecheck/TcMType.lhs line 517
-------------------------------+--------------------------------------------
Reporter: batterseapower | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 6.9 | Severity: normal
Keywords: | Testcase: gadt/equal
Architecture: Unknown | Os: MacOS X
-------------------------------+--------------------------------------------
This is exposed by running the testsuite on a stage2 compiler with
-DDEBUG. The tests triggering it are:
* gadt/equal
* gadt/set
* gadt/termination
* gadt/tc
* gadt/while
The affected context is the ASSERTM2 in:
{{{
writeMetaTyVar :: TcTyVar -> TcType -> TcM ()
writeMetaTyVar tyvar ty
| not debugIsOn = writeMutVar (metaTvRef tyvar) (Indirect ty)
writeMetaTyVar tyvar ty
| not (isMetaTyVar tyvar)
= pprTrace "writeMetaTyVar" (ppr tyvar) $
return ()
| otherwise
= ASSERT( isMetaTyVar tyvar )
-- TOM: It should also work for coercions
-- ASSERT2( k2 `isSubKind` k1, (ppr tyvar <+> ppr k1) $$ (ppr ty <+>
ppr k2) )
do { ASSERTM2( do { details <- readMetaTyVar tyvar; return (isFlexi
details) }, ppr tyvar )
; writeMutVar (metaTvRef tyvar) (Indirect ty) }
where
_k1 = tyVarKind tyvar
_k2 = typeKind ty
}}}
The precise error is:
{{{
=====> while(normal)
cd . &&
'/Users/mbolingbroke/Programming/Checkouts/ghc.working/compiler/stage2
/ghc-inplace' -fforce-recomp -dcore-lint -dcmm-lint -Di386_apple_darwin
-dno-debug-output -o while while.hs >while.comp.stderr 2>&1
Compile failed (status 256) errors were:
ghc-6.9.20080614: panic! (the 'impossible' happened)
(GHC version 6.9.20080614 for i386-apple-darwin):
ASSERT failed! file typecheck/TcMType.lhs line 517 t_aAZ{tv} [tau]
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2366>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs