[Haskell-iPhone] FFI for living in C

Stephen Paul Weber singpolyma at singpolyma.net
Sat Dec 1 22:26:39 CET 2012


Somebody claiming to be Casey Basichis wrote:
>Is the FFI the right tool for a situation where, while used extensively,
>Haskell is more or less there to take in data, like lists and spit out data
>like vectors etc back to C.

My current favourite way to do this is to start in Haskell-land and call 
some entry-point function in extern "C" that takes function pointers as 
arguments.  These function pointers become the way that C++ code can call 
back into Haskell-land.

This is what I am using for <http://github.com/singpolyma/haskades>

-- 
Stephen Paul Weber, @singpolyma
See <http://singpolyma.net> for how I prefer to be contacted
edition right joseph



More information about the iPhone mailing list