[Haskell-cafe] FFI and callbacks

John Goerzen jgoerzen at complete.org
Wed Jul 20 09:35:21 EDT 2005


I'm looking at packaging an event-driven console widget set (CDK) for
Haskell using FFI.  I know that other event-driven widget sets have
Haskell bindings, but I'm not quite sure how to make everything play
nice with forkIO.

These systems generally have some sort of an opaque main loop,
implemented in C.  This loop would usually never return, or perhaps only
return once the UI is destroyed.

How would I make this sort of system play nice with Haskell threads?

Also, the brief FFI docs that I've found don't really explain callbacks
in FFI very well to me.  Are there any other resources on this anywhere?


-- John

More information about the Haskell-Cafe mailing list