[MLton] CM hacking

Matthew Fluet fluet@cs.cornell.edu
Thu, 4 Mar 2004 16:20:22 -0500 (EST)


> Matthew mentioned some patches that improve on cmcat and handle some
> pretty serious code, so I'm not sure if we need much beyond those to
> do (1).  (Matthew, should your patches be checked in?)

The patches to cmcat require patches to SML/NJ.  So, I don't want to check
them into the MLton sources (unless I put them on a branch) unless I can
get the SML/NJ patches accepted and there is a SML/NJ working version with
the patches.  I'll describe what I've done to Matthias and see what he
thinks.  In any case, if anyone needs the more powerful cmcat, I can
always give them the cmcat.x86-linux heap, which should work with the
SML/NJ 110.45 runtime out of the box.

> Although I
> assume even with those patches that cmcat doesn't handle scoping, so
> there could be something useful there.

You are correct that my patches don't change scoping.  You still get a
list of files which MLton reads in as sequential topdecs.

> It's just that there aren't
> that many big SML programs and the lack of scoping doesn't really seem
> to be a problem.

I ran into one case with the Moby sources.  Both the SML/NJ Util library
and the SML/NJ mlyacc library include a  signature FIFO.  (The mlyacc one
is not exported by it's .cm file.)  By chance, they were loaded in an
order that didn't impact the rest of the program.