
On Wed, Mar 7, 2018 at 11:13 AM, John Wiegley
"EL" == Evan Laforge
writes: EL> If you are writing a new C binding, I recommend something higher-level EL> than hsc2hs, such as c2hs, which I think should sidestep the problem EL> entirely by verifying your types. But if you are already using hsc2hs and EL> for whatever reason don't want subtle memory corruption bugs, you can EL> import ForeignC instead of Foreign and Foreign.C, and see if you have any.
Note that c2hsc is even higher, since it will generate the .hsc files for you from the C headers.
So many C FFI tools. Is there a survey somewhere? That might have saved me some time long ago, when it seemed like the only choices were green card and hsc2hs, and green card was already somewhat obsolete looking. But come to think of it, I don't even know why...