2 Mar
2003
2 Mar
'03
1:19 p.m.
Hello, I'm working on interfacing a c library that has the notion of callbacks. I have a C function: f_setCallback( void (funptr*) () ); I would like to allow a haskell developer to have an interface like the following: callback :: IO () callback = putStr "Called!\n" main :: IO () main = do setCallback callback -- etc. Is this possible via. ffi? If so, how would I do it code wise? Thanks, David J. Sankel