packages (was Re: [MLton] syntax error for "_address")

John Reppy jhr@cs.uchicago.edu
Wed, 2 Nov 2005 11:33:40 -0600


On Nov 2, 2005, at 10:24 AM, Matthew Fluet wrote:
>> Also, what is the best way to package up an SML "library" that  
>> depends on generated C code (because of _export) and C libraries?  
>> Can the MLB tool support the steps of generating, compiling, and  
>> linking the C code?
>
> That's a good question, and currently an open area of design.  Our  
> current feelings are that an MLB file is a description of (SML)  
> source files and the compiler simply elaborates those files  
> acording to the semantics
> If there are other dependencies, then they should be captured in a  
> traditional Makefile.  You may find it useful to use
> `mlton -stop f z.mlb`  to get the files (transitively) used by z.mlb.
>

Consider the following situation:

I have a library of SML code that I want to use in multiple  
applications.  It depends on C libraries and
it uses "_export" to generate C code.  I can provide both a Makefile  
and mlb file for the library, but
how will these connect to the application build process?  How am I  
going to pass requirements for C libraries,
etc. up to the application's build process?  The GHC package system  
provides a nice mechanism for this
problem; you might want to check it out.

	- John