\-RTL and mlton

Matthew Fluet Matthew Fluet <fluet@CS.Cornell.EDU>
Wed, 19 Sep 2001 18:02:24 -0400 (EDT)


> I've built \-RTL using mlton, but it is useless because there's
> nothing good on the command line.  The doco doesn't say how to use
> a file written with SMLofNJ.exportFn.  Is it the same as MLton.World.save?

Looking at the implementation of SMLofNJ.exportFn in MLton, I think the
following should "work":

1. Run "lrtl" once, which should produce a file "lrtl.mlton"
   (assuming a call SMLofNJ.exportFn("lrtl", f))
2. Run "lrtl @MLton load-world lrtl -- ppc.rtl"

All the "lrtl" command line args can go after "--".

Alternatively, I believe that you can just have at the end of your sources

val _ = f (CommandLine.name (), CommandLine.arguments ())

where f is the function you were passing to exportFn.