
http://hackage.haskell.org/package/bindings-DSL http://bitbucket.org/mauricio/bindings-dsl
The only thing I've missed for now is a #ccall equivalence for "stdcall" functions, I hacked one up myself and called it #stdcall, but it would be nice to have in the package proper if possible.
Here is my attempt. I added #callconv macro, that accepts a calling convention parameter. The lines below are now equivalent. #ccall do_something , CString -> IO CInt #callconv do_something , ccall , CString -> IO CInt Would you mind give it some testing (and of course sugestions as you wish) before I upload it to Hackage? The link below gives you a few options for download format. Look for version 1.0.5. http://bitbucket.org/mauricio/bindings-dsl/downloads There are a few good C libraries that work well under Linux and Windows (libusb1.0 for Windows is in beta now, for instance). Do you think we should have a macro that defaults to 'ccall' in Linux and others and to 'stdcall' on Windows? If so, I would need some help to avoid portability issues (like a list of platforms and proper defaults). Thanks for your toughts, Maurício