Ticket #3323 (closed bug: fixed)
panic: funArgTy
| Reported by: | simonmar | Owned by: | simonpj |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.12.1 |
| Component: | Compiler (Type checker) | Version: | 6.11 |
| Keywords: | Cc: | ||
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | Difficulty: | Unknown | |
| Test Case: | typecheck/should_fail/T3323 | Blocked By: | |
| Blocking: | Related Tickets: |
Description
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.
Change History
Note: See
TracTickets for help on using
tickets.
