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

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


> > I would imagine something like:
> >
> > mlton -write-lib newA.world foo.mlb
> > mlton -read-lib newA.world -write-lib newB.world bar.mlb
> > mlton -read-lib newB.world -write-lib newC.world baz.mlb
>
> This seems nice.  As a check on semantics, this is exactly as if you
> had written
>
>   mlton -write-lib newC.world foo.mlb bar.mlb baz.mlb
>
> which is exactly as if you had written
>
>   mlton -write-lib newC.world bap.mlb
>
> where bap.mlb is
>
> 	foo.mlb
> 	bar.mlb
> 	baz.mlb
>
> That is, each read/write sequentially adds declarations to the basis.

That is reasonable.  It really depends on what we finally decide on as the
semantics of composable basis files.  For example, I'd really like to be
able to add a library to my world, but not include any declarations if I
never use the library.  In that case, when I write a lib, then we'd
parese/elaborate/type-check the lib, producing a set of declarations that
would be included if a final program ever included that lib.

> > Also, any more thoughts on doing one of the CM replacements?
>
> It's pretty near the front of the todo, but I wasn't thinking of doing
> it for the upcoming release.  The idea is to put in the next release
> support for mlb files along with a plan for supporting libraries, as
> well as a few initial libraries (hash tables, regexps, ...).

Cool.  I started playing around with ML-Doc to see how easy/hard it would
be to document the MLton library.  It wasn't bad, although the
documentation is pretty poor and the only publically available examples I
could find were the SML/NJ Library, although that is out of date relative
to the most recent ML-Doc software.  I'll drop John Reppy a line to see if
there are any updates to ML-Doc, any more documentation, and if the ML-Doc
sources for the basis library are available anywhere, as they would be
good examples to work off of.