
On Tue, Mar 11, 2008 at 02:47:37PM -0700, Simon Marlow wrote:
Yeah, I'd like -fvia-C to be headerless. We talked about it a while back (on the haskell-prime list I think). The main issue is that GHC would have to generate prototypes based on the FFI declaration, and since it can't guarantee to generate a prototype that is exactly the same as the C prototype given in the header file (e.g. it doesn't know about const), we would have to ensure that there really are no other prototypes in scope, to prevent errors from the C compiler.
I was thinking that you just wouldn't include any extra c headers at all then, just write out the appropriate c code to call with the conventions specified in the ffi import specification and you won't need external headers at all so there isn't anything to conflict with. John -- John Meacham - ⑆repetae.net⑆john⑈