Hi -
I've got a Haskell module with the following ffi import:

foreign import ccall duma_init :: Int -> IO Int

However my problem is that I've got no idea what the type signature for the corresponding C function should be, and when I compile the above module with ghc -fglasgow-exts -fffi --make it doesn't create any stubs either.

I've tried looking at the wiki but that only seems to give specific examples. I'm trying to find what the mapping is between Haskell function signatures and C signatures is in general. Any ideas?

Also, I really wanted to be able to use () -> IO () but () doesn't seem to be allowed in FFI...

A third point is, how would I pass an arbitrary monad instead of just using IO?

Thanks, Brian.


_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to