Ticket #2366 (closed bug: duplicate)

Opened 6 months ago

Last modified 2 months ago

ASSERT failed! file typecheck/TcMType.lhs line 517

Reported by: batterseapower Assigned to:
Priority: normal Milestone: 6.10.1
Component: Compiler Version: 6.9
Severity: normal Keywords:
Cc: Difficulty: Unknown
Test Case: gadt/equal Operating System: Unknown/Multiple
Architecture: Unknown/Multiple

Description

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]

Change History

07/01/08 09:36:14 changed by igloo

  • difficulty set to Unknown.
  • os changed from MacOS X to Multiple.
  • milestone set to 6.10.1.

07/01/08 09:37:02 changed by igloo

This is reproducible with ./validate --slow.

07/04/08 01:55:40 changed by chak

  • status changed from new to closed.
  • resolution set to duplicate.

Duplicate of #2212.

09/30/08 08:40:38 changed by simonmar

  • architecture changed from Unknown to Unknown/Multiple.

09/30/08 08:54:56 changed by simonmar

  • os changed from Multiple to Unknown/Multiple.