Ticket #3323 (closed bug: fixed)

Opened 4 years ago

Last modified 4 years ago

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

Changed 4 years ago by simonpj

  • owner set to simonpj

I'm on it.

Changed 4 years ago by simonpj

  • status changed from new to closed
  • testcase set to typecheck/should_fail/T3323
  • resolution set to fixed

Fixed by

Thu Jun 25 00:23:40 PDT 2009  simonpj@microsoft.com
  * Fix Trac #3323: naughty record selectors again
  Ignore-this: 5ea70e631a2104ae7bf139f89a91a63a
  
  I boobed when I decoupled record selectors from their data types.
  The most straightforward and robust fix means attaching the TyCon
  of a record selector to its IfaceIdInfo, so 
  
     you'll need to rebuild all .hi files
  
  That said, the fix is easy.

Simon

Note: See TracTickets for help on using tickets.