Re: Extension to the FFI to allow macro expansions to be avoided

Fergus Henderson <[email protected]> Thu, 15 Apr 2004 04:32:01 +1000
Newsgroups gmane.comp.lang.haskell.ffi
Message-ID <[email protected]>
On 13-Apr-2004, Ross Paterson <[email protected]> wrote:
> And Hugs too.  The issue isn't extending the FFI but implementing it
> more accurately and consistently.  As you point out, systems compiling
> via C have been extending the FFI to a function+macro interface, which is
> incompatible with systems compiling to native code.  Having been bitten by
> the same thing in the opposite direction (macros that work with ffihugs
> or ghc -fvia-C don't work with ghc -fasm), I'd favour turning off the
> macro interface, preferably with #undef, at least by default.

I'd rather fix GHC so that interfacing with C macros works with ghc -fasm.
The equivalent works fine with the Mercury implementation ("mmc --target asm"
generates assembler for the Mercury code and C stubs for the FFI glue),
so it's clearly possible.

-- 
Fergus Henderson                    |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.