panic: funArgTy
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.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 6.11 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler (Type checker) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |