[MLton] mlb files and the ML Kit
Stephen Weeks
MLton@mlton.org
Fri, 12 Mar 2004 10:31:26 -0800
> I don't see the practical need for basis-identifiers over using the
> file-system to name bases. (That is, I'm in favor of the former
> proposal.) What is the motivating example for basis-identifiers?
One argument that I see is by analogy to CM. One of the features that
I dislike about CM is that I can get extra expressiveness by dropping
down into a new file, e.g. using and administrative group to add an
import filter. I like the fact that mlb files don't require this.
The extra expressiveness that one gets in the case of mlb files is the
ability to start evaluation in a clean basis and the ability to name a
basis. So, one could write
basis Basis1997 = bas ... end
basis Basis2002 = bas ... end
local
open Basis1997
in
...
end
local
open Basis2002
in
...
end
Of course it is not a question of expressiveness, just of convenience,
since one could put the definitions of Basis1997 and Basis2002 in
separate files and refer to the files instead of opening the bids.
As a more specific example, suppose one wanted to look at a single mlb
file describing MLton or some other large program that was composed of
a bunch of mlb files. It would be nice to have a simple tool that
took an mlb and followed all the indirections, producing a single mlb
with no references to other mlbs (maybe this is what Martin was
talking about).
I could imagine that being useful, and it's something you can't do
without the more expressive language.