
10 Dec
2008
10 Dec
'08
7:44 a.m.
On Wed, Dec 10, 2008 at 12:30:56PM +0000, Duncan Coutts wrote:
If do recommend reading the FFI spec. It's quite readable and explains a lot of the issues. Getting familiar with the Foreign libraries will help too. The most important bits are understanding ForeignPtr and the Storable class.
I would also add the chapter 17 of Real World Haskell. you can read it here: http://book.realworldhaskell.org/read/interfacing-with-c-the-ffi.html It will guide you through the writing of the bindings to the PCRE library. Very useful and nicely conceived. A good collection of Storable instances that I found very helpful in understanding the subject can be found in the X11 bindings. Hope this helps, Andrea