[MLton] cvs commit: world no longer contains a preprocessed basis library

Matthew Fluet fluet@cs.cornell.edu
Wed, 10 Dec 2003 09:31:03 -0500 (EST)

> > I  guess  that  what  I am asking for is another directive for the .mlb files
> > which means to include any of this stuff if it is `used', where `used' should
> > be  interpreted  as it is for the basis.  I.e., more stuff is considered dead
> > code.
> I will add some kind of directive like this, at the very least so we
> can move the basis libary stuff as much as possible into mlb files.
> However, the dead-code hack used for the basis library is unsafe in
> general and almost certainly too aggressive for normal code.  It works
> on the granularity of declarations.  I am thinking that the default
> granularity for mlb files will be at the level of files.

Unsafe or just not-semantics preserving?

And I'm not sure that file-level granularity will work out.  For example,
if I use MLton.Random.rand but never use threads, will I be forced to
include MLton.Thread because  basis-library/mlton/mlton.{sig,sml}
references  basis-library/mlton/thread.{sig,sml}.  Or, worse, if we keep
the Basis2002 structure, then using the basis will include everything,
because everything is referenced through the basis.sml file.

I thought the dead-code criteria was pretty straight-forward, for library