Extension to the FFI to allow macro expansions to be avoided

Sven Panne Sven.Panne at aedion.de
Thu Apr 15 02:58:03 EDT 2004


Fergus Henderson wrote:
> [...] the Haskell FFI has sacrificed quality for easy of implementation.
> If this starts causing problems for users, I think the right solution
> is to raise the bar for implementations, not to lower it. [...]

I definitely support Fergus' point of view, GHC and Hugs really rushed
head over heels towards a wrong direction, IMHO. If I see this correctly,
the only problems were that GHC's native code generator doesn't handle
macros currently and the handling of "broken" macros in the C back-end and
Hugs. I think we can safely forget about the latter (by using #undef or
a small wrapper), and we should have a look how to solve the former.
Mercury seems to handle this, although I'm currently not sure at what
price (in terms of implementation effort and possible performance loss).

Cheers,
    S.

P.S. to Malcolm: I did not mention nhc98, because I don't know how its
back-end works, not because of an evil master plan against nhc98... :-)




More information about the FFI mailing list