id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	os	architecture	failure	difficulty	testcase	blockedby	blocking	related
3323	panic: funArgTy	simonmar	simonpj	"The following module crashes GHC 6.11.20090615:

{{{
module V where

import GHC.IO.Handle.Types
import GHC.IO.Handle.Internals

f :: Handle -> IO ()
f hdl = withHandle_ """" hdl $ \h -> return h{haDevice=undefined}
}}}

results:

{{{
$ ghc-testing2 --make V.hs
[1 of 1] Compiling V                ( V.hs, V.o )
ghc-stage2: panic! (the 'impossible' happened)
  (GHC version 6.11.20090615 for x86_64-unknown-linux):
        funArgTy ghc-prim:GHC.Unit.(){(w) tc 40}
}}}

It imports some internals of the IO library;  I tried to reproduce it with a completely standalone module, but failed.  The field `haDevice` of `Handle__` has existential type - normally GHC rejects a record update when the field has existential type, but does not in this case, I'm not sure why.
"	bug	closed	normal	6.12.1	Compiler (Type checker)	6.11	fixed			Unknown/Multiple	Unknown/Multiple		Unknown	typecheck/should_fail/T3323			
