[Haskell-cafe] question concerning ANSI "void *"

Galchin Vasili vigalchin at gmail.com
Thu Feb 7 13:14:51 EST 2008


Hello,

     Ok .. I am writing a Haskell function that will call down into the ANSI
C library .. blah :: .... -> Ptr Word8 ....-> .... The underlying C function
that "blah" is calling has a "void *" so I am using "Ptr Word  8" to model
the "void *". I propose to have the callers of function "blah" to populate a
data structure something like "Ptr Buz" where "data Buz = { ........} and
then do a "recast :: Ptr Word 8 -> Ptr Buz" when invoking function "blah".
Does this seem reasonable? Is there a better way?

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


More information about the Haskell-Cafe mailing list