[Haskell-cafe] Re: Begginer question about alignment in Storable
Mauricio
briqueabraque at yahoo.com
Thu Nov 20 11:26:11 EST 2008
> (...) 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 storable instance. With hsc2hs you
> would write it like this: (...)
Thanks! This is actually a really nice tutorial! Do you mind if I
try to find a place for it in the wiki?
> Regarding "cabal setup", that is only really needed if you are
> intending to build a package to distribute to other people. (...)
I didn't know about hsc2hs, but I'm a big fan of cabal. I would
use it even in "Hello Word".
> (...) (I don't have a good link for learning cabal; you'll have
> to google around (e.g. "haskell cabal") for info.)
Compreensive as a reference, easy to follow as a tutorial:
http://www.haskell.org/ghc/docs/latest/html/Cabal
Best,
MaurĂcio
More information about the Haskell-Cafe
mailing list