ghc crashes on strange foreign import

Ben Franksen ben.franksen at online.de
Fri Feb 27 09:59:09 EST 2009


This is the code:

{-# OPTIONS -fglasgow-exts #-}
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:

ben at 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]

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

Cheers
Ben



More information about the Glasgow-haskell-users mailing list