How to find out the C type signature corresponding to a
Haskell function type in FFI?
Bulat Ziganshin
bulat.ziganshin at gmail.com
Wed Mar 8 02:49:23 EST 2006
Hello Brian,
Wednesday, March 8, 2006, 12:03:27 AM, you wrote:
BH> mycallback :: GUIMonad m => EventInfo -> m EventResult
BH> 'm' will have to combine a state monad with the IO monad (so I can use IORef
BH> etc if needed).
as Ian Lynagh wrote, it's no problem if your monad is IO-based. if FFI
by itself don't support this, you can add "liftIO" wrappers:
foreign import f :: IO ()
f_wrapper :: GUIMonad m => m ()
f_wrapper = liftIO f
--
Best regards,
Bulat mailto:Bulat.Ziganshin at gmail.com
More information about the Glasgow-haskell-users
mailing list