
20 Jul
2005
20 Jul
'05
9:35 a.m.
Hi, 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? Thanks, -- John