extended foreign decls

Manuel M. T. Chakravarty chak at cse.unsw.edu.au
Tue Jan 2 20:12:50 EST 2001

qrczak at knm.org.pl (Marcin 'Qrczak' Kowalczyk) wrote,

> Tue, 2 Jan 2001 22:28:02 +1100, Fergus Henderson <fjh at cs.mu.oz.au> pisze:
> > Doing it in a separate tool will lose efficiency in some important
> > cases.  If the compiler is compiling via C, then it can insert
> > inline C code directly in the generated code, and thus get
> > inlining.  But I think a separate tool would have to put the C code in
> > a separate C file, which would prevent inlining.
> hsc2hs creates a .c file and a .h file for snippets of C code.
> The .h file is included into the .hc file generated by ghc.
> If you mark functions as inline, they will be really inlined.

This sounds like a good solution to the problem.


More information about the FFI mailing list