[MLton] mlnlffigen is awesome (was: bootstrap problem)

Matthew Fluet fluet@cs.cornell.edu
Mon, 22 Aug 2005 09:22:23 -0400 (EDT)


>> I believe that changing the MLB path variable environment during
>> elaboration would seriously alter the semantics of "caching" a previously
>> elaborated .mlb file, which is a very important aspect.
>
> What I had in mind is that path variables would work just like other
> bindings; Path variable bindings imported from a basis would only effect
> paths in the scope of the import.

O.k., I see what you meant now.  I agree that scoping of path variables in 
this manner is much more consistent with the semantics of MLB files.

I'm still a little lukewarm on the idea;  I don't know of a compelling 
usage scenario, which isn't to say there isn't one.

It just seems to me that if you have something like:

var V1=d0
$(V1)/s1.sml
$(V1)/s2.sml

where you are importing multiple .sml files from the same path, then it 
would be a good practice to define a single .mlb file in that directory:

var V1=d0
$(V1)/s.mlb

in which case, there isn't much advantage to a path variable:

d0/s.mlb