#3066: Crash with bogus FFI declaration
-------------------------------+--------------------------------------------
  Reporter:  simonpj           |          Owner:  simonpj         
      Type:  bug               |         Status:  new             
  Priority:  normal            |      Milestone:                  
 Component:  Compiler          |        Version:  6.10.1          
  Severity:  normal            |       Keywords:                  
Difficulty:  Unknown           |       Testcase:                  
        Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
-------------------------------+--------------------------------------------
 Ben Franksen finds this:
 {{{
 {-# LANGUAGE ForeignFunctionInterface, RankNTypes #-}
 import Foreign
 type X u = Ptr ()
 foreign import ccall bla :: (forall u. X u) -> IO ()
 }}}
 I know of course that I must not use fancy types in foreign imports. I
 forgot for a moment and instead of an error message got:
 {{{
 b...@sarun> ghci Bug3
 GHCi, version 6.10.1: http://www.haskell.org/ghc/  :? for help
 Loading package ghc-prim ... linking ... done.
 Loading package integer ... linking ... done.
 Loading package base ... linking ... done.
 [1 of 1] Compiling Main             ( Bug3.hs, interpreted )
 ghc: panic! (the 'impossible' happened)
   (GHC version 6.10.1 for i386-unknown-linux):
         unboxArg:
     Bug3.hs:4:0-51 forall u{tv aht} [tv].
                    main:Main.X{tc rhp} u{tv aht} [tv]
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3066>
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