[MLton] the syntax of MLBs
Stephen Weeks
MLton@mlton.org
Thu, 16 Sep 2004 18:21:12 -0700
The main reason I brought up the scripting stuff now, even though it's
not part of the upcoming release, is that it may affect the syntax of
MLBs, which are part of the release.
In thinking about MLBs, a couple of other ideas about syntax occured
to me.
1. It seems that there is no way to include a file name with a space
in it. This is bad. One way to fix this would be to put filenames
in double quotes, and use the same lexical rules as for SML
strings.
2. I wonder if we went overboard with my goal of making a list of
files be a valid mlb. Would it perhaps be better or clearer if we
had a keyword to import files. We could use "include", "require",
"import" (although that's not so good because of _import), or
something else. So, instead of
foo.sml
bar.sml
We would have
include "foo.sml"
include "bar.sml"
or even
include "foo.sml" "bar.sml"
Maybe "open" would be a reasonable keyword as well, if we think of
the meaning of a file as a basis and referring to the file as
opening that basis.
3. I wonder if we should emphasize the different treatment of
.sml files and .mlb files using different keywords. Perhaps we
should write
include "foo.sml"
open "foo.mlb"
to emphasize that .sml files are re-elaborated at each instance,
while .mlb files are like a basis that is opened.