
On Sat, Jan 12, 2002 at 01:24:54PM +1100, Manuel M. T. Chakravarty wrote:
Mark Conway Wirt wrote,
I'm looking for opinions as to the best way to do a C (or C++) foreign interface to GHC haskell code.
It looks like there are three options.
I think, there are five options:
* H/Direct (you mentioned that already) * GreenCard (ditto) * C->Haskell http://www.cse.unsw.edu.au/~chak/haskell/c2hs/ * hsc2hs (comes with GHC) * Plain FFI
And what are the pros and cons of each? Presumably you recommend C->Haskell, since you wrote it; what makes it better? (My situation: I want to interface to C code with several rather large structures, so plain FFI is not very attractive. I've started using C->Haskell, but am curious about other people's experiences.) --Dylan Thurston