FFI

Dylan Thurston dpt@math.harvard.edu
Sat, 12 Jan 2002 12:36:17 -0500


--wRRV7LY7NUeQGEoC
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, Jan 12, 2002 at 01:24:54PM +1100, Manuel M. T. Chakravarty wrote:
> Mark Conway Wirt <mark@ArsConcero.org> wrote,
>=20
> > I'm looking for opinions as to the best way to do a C (or C++)
> > foreign interface to GHC haskell code.
> >=20
> > It looks like there are three options.
>=20
> I think, there are five options:
>=20
> * 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

--wRRV7LY7NUeQGEoC
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8QHQRVeybfhaa3tcRAqCqAJ41vVpoBVu3dws6+5Nra0++PVGlIACaA1qT
X/fV4kKi0V3fzrsMJw4DKhg=
=P2AZ
-----END PGP SIGNATURE-----

--wRRV7LY7NUeQGEoC--