Generating Function Prototypes

Sven Panne Sven_Panne at
Mon Jul 8 06:46:08 EDT 2002

Simon Marlow wrote:
> [...] I can see one drawback: if mangling is required in order to compile
> FFI code, then it means we won't be able to do unregisterised compilation.
> Or at least unregisterised compilation would need some extra machinery,
> like header files or auto-generated FFI wrappers. [...]

What about a hybrid strategy?

   * For unregistered compilation things stay as they are now, i.e. the
     names are not (un-)mangled and no prototypes are generated. For all
     the GHC stuff we can still assure that enough prototypes are available
     for gcc (#ifdef, #include, ...).

   * For registered compilation Alastair's suggestion is used.

That should be enough to bootstrap GHC.


More information about the FFI mailing list