[Haskell-cafe] FFI and returning structs

Maurí­cio briqueabraque at yahoo.com
Tue Nov 18 20:07:54 EST 2008


Hi,

I have not found examples of this in documentation
or hackage packages: how can I deal with funcions
returning not pointers to structs but structs
thenselves?

struct example {...

example function_name (...

My intuition said I could try a data declaration
that is a properly done instance of Storable, and
then use that.

data Example = ...

instance Storable Example where ...

But it seems I was wrong.

Do you have any tips on how to proceed?

Thanks,
Maurício



More information about the Haskell-Cafe mailing list