How to find out the C type signature corresponding to a Haskell function type in FFI?

Bulat Ziganshin bulat.ziganshin at gmail.com
Thu Mar 9 02:46:02 EST 2006


Hello Marcin,

Thursday, March 9, 2006, 2:20:00 AM, you wrote:

>> foreign import ccall duma_init :: Int -> IO Int

MQK> HsInt duma_init(HsInt arg);

MQK> Or use int on the C side and CInt on the Haskell side.

MQK> fromIntegral can be used for converting integers in Haskell.

for small "home" projects you can even use "Int" and "int" which
would work in most of Haskell implementations


-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com



More information about the Glasgow-haskell-users mailing list