FFI Definition

Simon Marlow simonmar at microsoft.com
Mon May 7 05:34:43 EDT 2001


> I still don't understand the dynamic library stuff related to 
> "fname". Is
> it a hint for a compiler to link against a given library? Any compiler
> surely has some kind of option/pragma for this already. What should it
> mean when there is a corresponding static lib, but not a dynamic one? 
> Most of the time one doesn't really care about this. What 
> should it mean
> for an interpreter? dlopen-ing? How should the condition
> 
>    "... if the external entity has to be obtained from a dynamically
>     loaded library ..."
> 
> be implemented, i.e. when does "fname" simply denote the header to
> #include and when does it denote something related to a DLL? It looks
> like mixing two unrelated concepts here.

I thought we agreed to remove the specification of libraries from the
FFI, and leave it to some compiler-dependent mechanism.  As Sven points
out, there are going to be times when you really don't want a library at
all, or in any case not one with the same name as the header file, and
there will be cases where you want several libraries in some
system-dependent order that shouldn't be placed in the source code.

GHC already has such a mechanism: the package system, and additionally
using fname as a library spec would make our lives somewhat harder.  I
suggest just deleting the sentence "Moreover ... may be made." on page
6.

Cheers,
	Simon




More information about the FFI mailing list