You'll need to write haskell code to marshal those datastructures into ones you can use in Haskell. The c2hs tool is very helpful in this regard: http://hackage.haskell.org/package/c2hs
While the tool appears to be designed for calling C from Haskell, it is also very useful for the opposite in one sense -- it allows you to marshall complex C types into Haskell types. Since the functions you expose will need to take C types (typically pointers to complex structures), then you can A) construct appropriate C structures, and B) use the features c2hs provides in order to then marshall those structures into Haskell in your exposed functions, so that you can work with them.
Also note that with c2hs style generated tools, you don't need to marshall everything. You can just generate accessors to peek into the parts of C data structures that you actually care about.
answered 2013-07-23T16:48:40.040