interfacing to C library - c2hs/hsc2hs/GreenCard?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

interfacing to C library - c2hs/hsc2hs/GreenCard?

Brian Sammon-2
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.
_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
Reply | Threaded
Open this post in threaded view
|

Re: interfacing to C library - c2hs/hsc2hs/GreenCard?

Erik de Castro Lopo-34
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/
_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.