[MLton] Welcome to Dan Wang
Daniel C. Wang
danwang@CS.Princeton.EDU
Wed, 03 Mar 2004 18:08:25 -0500
Stephen Weeks wrote:
>>>In particular I thought there was some code that took a portable graph
>>>description and dumped out one big SML file. This is at least my
>>>recollection last time I talked to Matthias Blume a few years back.
>>
>>You are thinking of GenSML.gen.
>>That will produce one big SML(/NJ) file for one .cm file. It's up to you
>>to figure out what other .cm files to GenSML.gen to produce the
>>appropriate imports. That's where you need more information than
>>CM.Graph.graph gives you, because the imports may be under rebound
>>anchors.
>
>
> Does GenSML.gen (or any other function) do the renaming that is needed
> to handle export filters?
It does renaming properly, using "local" and rebinding appropiately.
Unfortunately it seems to use extended SML/NJ syntax to do this. A more
sophisticated version could alpha rename the code directly assuming it has
access to an SML parser and pretty-printer. In the end that might be what
needs to get done to make this generate pure SML. Still, sounds like a
"weekend hack". For a sufficently long defintion of weekend. :)