[MLton] mlton-lib documentation

Matthew Fluet fluet@cs.cornell.edu
Wed, 7 Jan 2004 16:53:59 -0500 (EST)

> I hope to make libraries a major focus for the MLton release after
> this one.  This includes: support for mlb files, file-based dead-code
> elimination in the elaborator, making available some useful libraries
> (DirectedGraph, Hash, Regexp, URL, ... <your request here>), and
> documentation.

Layout?  Only because virtually every other module gives a layout

> One thing I've started thinking about is how to make stuff available
> from lib/mlton as well as the MLton structure of our current basis.  I
> think it would be confusing for users to have these two different
> libraries to choose from.  I further think that lib/mlton is way too
> big, both in the number of things exported, and the sizes of some of
> the signatures.  So, my current thinking as to the way to go is to
> release a combination of what's currently in the MLton structure with
> a subset of lib/mlton.

Certainly lib/mlton is much too big.  One way of dealing with the size of
signatures would be to revisit the design of the lib/mlton
library.  A thought I had, would be to make greater use of include.  For

signature T = sig type t
signature HASHABLE = sig type hashable
                         val hash : hashable -> word
signature ORDERED = sig type ordered
                        val compare : ordered -> order
signature EQUALITY = sig type equality
                         val equals : equality * equality -> bool

signature FOO =
    include T
    include HASHABLE where type hashable = t
    include ORDERED where type ordered = t
    include EQUALITY where type equality = t

> those stubs would be messy, error prone, and a lot of work.  So my
> current thinking is that we should keep development of the MLton
> compiler, the MLton structure, and the MLton library in close
> synchronization.

Makes sense.