8 Jul
2002
8 Jul
'02
10:29 p.m.
Here is nhc98's approach to solving the problem. The usual case is for the Haskell compiler to generate a C prototype for the FFI function based solely on the Haskell type. On the rare occasions where the generated prototype conflicts with a #include'd prototype, you can add the 'noproto' modifier to the Haskell FFI decl, and the prototype is omitted. This is both easy, and (I would guess) very portable.
But surely that would be non-portable because different Haskell systems would have different prototypes in scope? Or am I not understanding the idea? Cheers, Simon