#3323: panic: funArgTy
--------------------------------------+-------------------------------------
  Reporter:  simonmar                 |          Owner:                  
      Type:  bug                      |         Status:  new             
  Priority:  normal                   |      Milestone:  6.12.1          
 Component:  Compiler (Type checker)  |        Version:  6.11            
  Severity:  normal                   |       Keywords:                  
Difficulty:  Unknown                  |       Testcase:                  
        Os:  Unknown/Multiple         |   Architecture:  Unknown/Multiple
--------------------------------------+-------------------------------------
 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.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3323>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to