[MLton-user] SML_LIB from a CM file

Matthew Fluet fluet at tti-c.org
Fri Sep 14 19:49:37 PDT 2007


On Fri, 14 Sep 2007, Sean McLaughlin wrote:
>  Is there a way to reference the MLton SML base directory from
> a CM file?

In short, no.  The MLBasis path variables aren't available in the 
(limited) CM support.

> The MLBasis systems seems more understandable than CM, but I still rely 
> on the NJ top level for experimentation, so I'd like to just have one 
> compilation file if possible.

You might try the 'cm2mlb' tool that is described at the bottom of
   http://mlton.org/CompilationManager
In the MLton sources, it is available at <src>/util/cm2mlb.
It will properly translate $/basis.cm and $/smlnj-lib.cm entries in .cm 
files to $(SML_LIB)/basis/basis.mlb and 
$(SML_LIB)/smlnj-lib/Util/smlnj-lib.mlb, etc.  It shouldn't be too hard to 
use a Makefile to keep the .cm and .mlb files in sync.




More information about the MLton-user mailing list