id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	os	architecture	failure	difficulty	testcase	blockedby	blocking	related
2866	panic with GADTs + NoMonomorphismRestriction	ganesh	igloo	"The program below causes

{{{
ganesh@defoe:~/temp$ ghc -c Test.hs
ghc: panic! (the 'impossible' happened)
  (GHC version 6.10.1 for i386-unknown-linux):
        initC: srt_lbl
}}}

with ghc, and 

{{{
*Test> E 5
ghc: panic! (the 'impossible' happened)
  (GHC version 6.10.1 for i386-unknown-linux):
        nameModule xs{v afT}
}}}

with ghci

The problem goes away with ghc -O.

{{{
{-# LANGUAGE GADTs, NoMonomorphismRestriction #-}
module Test where

data Expr a = E Int
  deriving Show

data IsSeq a where
   IsSeq :: IsSeq [a]

isSeq :: Expr a -> IsSeq a
isSeq = undefined

mkSeq :: [Expr [a]] -> Expr [a]
mkSeq = undefined

unSeq :: Expr [a] -> [Expr [a]]
unSeq = undefined

sequenceEquality :: Expr a -> Expr a
sequenceEquality x = case isSeq x of
                             IsSeq -> let xs = unSeq x in mkSeq xs
}}}"	bug	closed	normal		Compiler	6.10.1	duplicate		ganesh@…	Linux	x86		Unknown				
