3 Jan
2001
3 Jan
'01
9:12 a.m.
qrczak@knm.org.pl (Marcin 'Qrczak' Kowalczyk) wrote,
Tue, 2 Jan 2001 22:28:02 +1100, Fergus Henderson <fjh@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. Cheers, Manuel