Haskell question, C bindings and c2hs
Sundials has a function IDACreate, wish allocates a block of memory to then pass around. This block of memory is simply of type void*
When I import this function with c2hs, I would like to make the Haskell version return a newtype wrapper around the pointer, but c2hs doesn't let me do that.
re: Haskell question, C bindings and c2hs
Everything I've tried has failed, either because I can't use void* as the type of some hooks (either it can't parse it, or it complains it's not declared anywhere or it just fails with an internal error, depending on the hook I try to use).
Does anyone know if there's a way around the problem, or if I'm just condemned to use Ptr () for this?
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!