[Haskell-cafe] how to handle FILE* with c2hs

Johannes Waldmann waldmann at imn.htwk-leipzig.de
Wed Dec 17 08:19:25 UTC 2014


Hi.

I could use an example of how to handle files (FILE *) with c2hs,
but could not find any.

I want to call some "void dump (..., FILE * f)" function.
I want to use this for a handle that I obtained in Haskell land.

Sure I can rewrite/add the C code so that it takes a filepath (string)
and opens the file by itself, but should I?

- J.W.




More information about the Haskell-Cafe mailing list