Haskell FFI - can you obtain a C Pointer from a Haskell data structure?
问题 I have quite a few C structs structured like typedef struct { unsigned int a; unsigned int b; } StructA; And a lot of functions like void doSomethingWith(StructA*,StructB*,StructC*); Is there an easy way to call these functions with Haskell FFI? Like, is there something that behaves like the & operator in C? (I imagine there isn't, but if there was I'd like to know). Do I have to make the Haskell side data 's instance of storeable (I don't have any constructor functions for these structs).