packages (was Re: [MLton] syntax error for "_address")
Thu, 3 Nov 2005 17:58:12 -0800
> > The difficulty is with _export, although part of that difficulty is that we
> > currently have a compilation model for _export that requires it to be keyed
> > to the whole program.
> Actually, now that I think about it, the .h files shouldn't change from
> one whole-program to another.
Right. The .h file that MLton generates with -export-header just
defines the prototypes of the exported functions. The implementations
(in particular, the indices into the exports array) are not defined
until the whole SML program is compiled. So, there is no problem in
compiling C libraries depending on the SML exports without having (or
compiling) the whole SML program.