[MLton] Welcome to Dan Wang
Matthew Fluet
fluet@cs.cornell.edu
Wed, 3 Mar 2004 17:35:38 -0500 (EST)
> Oh, I forgot how CMCat worked... I know that somewhere hiding in the SML/NJ
> CM sources is a way of turn a sources.cm file into one big SML file which
> unlike CMCat actually handles all the crazy CM filtering and export stuff. I
> basically want to port that to MLton so we can have all the normal CM
> semantics with scoping etc...
>
> 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.
See the discussion starting at:
http://www.mlton.org/pipermail/mlton/2003-December/015210.html
to see how the new cmcat is working.
Presumably you could modify the way that GenSML.gen worked so that it
recursively pulled in other libs.