[Haskell-cafe] [ANN] Haskell FFI Tutorial
cpdurham at gmail.com
Sat Nov 8 17:06:53 UTC 2014
I just built an FFI Interface for a camera in C++ called from Haskell, it
would be nice to see an interface done for C++ with objects. I got it
working pretty quickly searching around from other sites, but it would be
cool if it was all in one place.
Sort of off topic, I had an issue where the main in C++ ran perfectly fine
calling into what I believe to be a singleton, but calling from Haskell led
to that call freezing every time. If I put the call to the singleton into a
static block, it runs fine calling from Haskell. Is this probably the
"Static order initialization fiasco"?
On Sat, Nov 8, 2014 at 10:54 AM, Alex Petrov <oleksandr.petrov at gmail.com>
> Hi Everyone,
> I've recently started working on Haskell FFI Tutorial . The repository
> contains code that explains how to:
> * (expressively) represent C `struct` in Haskell code
> * call C code from Haskell
> * call Haskell code from C
> * operate on nested `struct`s
> * operate on `struct` arrays
> * decode `unions`
> * read and write C fixed-length strings and Pointer-type Strings
> * how to import functions from, for example, stdlib
> I'm still working on more story-like writeups, but the first one (about
> how to call Haskell
> from C) is already available .
> If you have any feedback / comments / questions, know how to improve it or
> would like to see more things covered, just ping me.
>  https://github.com/ifesdjeen/haskell-ffi-tutorial
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe