ffi010.hs 261 Bytes
Newer Older
1 2 3 4 5 6 7 8 9
import Foreign

-- !!! GHC 5.04.2 was missing rts_mkFunPtr, which meant that this example
-- !!! didn't link.

foreign import ccall "wrapper" 
  makeHaskellFun :: (FunPtr a -> IO ()) -> IO (FunPtr (FunPtr a -> IO ()))

main = makeHaskellFun (const (return ()))