interfacing to C library - c2hs/hsc2hs/GreenCard?

I'd like to write a haskell app that calls a C library that I wrote. This is my first time trying to do something like this. What would people here recommend I start with? c2hs? hsc2hs? GreenCard? One of the newer tools like bindings-dsl or inline-c? It's a relatively small library -- a handful of structs and a bunch of functions that take them as input, often returning another as output, and ultimately doing some libcurl to exchange data with websites. Also, can anyone recommend some documentation to read, that's applicable to GHC 8? A lot of the stuff I found on google predates GHC 8 (and a fair amount predates GHC 7)--not sure if that's likely to be a problem.

Brian Sammon wrote:
I'd like to write a haskell app that calls a C library that I wrote. This is my first time trying to do something like this. What would people here recommend I start with? c2hs? hsc2hs? GreenCard? One of the newer tools like bindings-dsl or inline-c?
I'm prety sure GreenCard is dead. Hsc2hs has the advantage of being bundled with GHC and used in the GHC build system to build the boostrap libraries. I've not used the others. Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/
participants (2)
-
Brian Sammon
-
Erik de Castro Lopo