[Haskell-cafe] another FFI question

Galchin, Vasili vigalchin at gmail.com
Fri Jun 20 15:51:11 EDT 2008


    I am reading the FFI spec. The following is unclear to me. Say I have

data Bonzo = A | B |C

and I want to "poke" Bonzo to an Int

A -> 0

B -> 1

C -> 4

I have made  Bonzo an instance of Storable.

How do I write the poke functions and call them?

Thanks, Vasili
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20080620/2eae9718/attachment.htm

More information about the Haskell-Cafe mailing list