Thanks! This is actually a really nice tutorial! Do you mind if I
try to find a place for it in the wiki?
Go right ahead (...)
For reference:
http://haskell.org/haskellwiki/FFI_cook_book
Best,
MaurĂcio
___
Haskell-Cafe mailing list
On Wed, Nov 19, 2008 at 1:01 PM, Mauricio [EMAIL PROTECTED] wrote:
If you are using hsc2hs (if you are using Cabal this is easy; just
rename the file to *.hsc and Cabal will take care of the rest), then
there is a macro for making this easier and so you don't have to think
about it. (...)
(...) But the major advantage of hsc2hs is that if your C
struct changes or you use a different C compiler, the allignment
and size as well as the offsets used in peek and poke will still
be correct since the compiler will calculate it for you. (...)
And you wanted to write a
On Thu, Nov 20, 2008 at 11:26 AM, Mauricio [EMAIL PROTECTED] wrote:
(...) But the major advantage of hsc2hs is that if your C
struct changes or you use a different C compiler, the allignment
and size as well as the offsets used in peek and poke will still
be correct since the compiler
If you are using hsc2hs (if you are using Cabal this is easy; just
rename the file to *.hsc and Cabal will take care of the rest), then
there is a macro for making this easier and so you don't have to think
about it. (...)
Well, after reading FFI addendum, I'm using
my loyal text editor. Am I