[MLton-devel] (no subject)

Stephen Weeks MLton@mlton.org
Fri, 22 Aug 2003 22:52:50 -0700


> I  am  clearly missing something basic here.  I see that stand-alone programs
> which use the  MLton  library  (like  mlprof)  have  2  .cm  files.   One  is
> sources.cm, which looks like I would expect, just listing
>     .../mlton/lib/mlton/sources.cm
> to  get  the  MLton  library.   The  other,  (mlprof.cm  in  the mlprof case)
> explicitly lists all the files used from the MLton library.  If I try to  run
> MLton with the sources.cm file as an argument it complains that SMLNJ_VERSION
> is an undefined symbol in
>     .../mlton/lib/mlton-stubs/sources.cm
> 
> Is there really no single .cm file that I can use when compiling from  MLton?

When compiling with MLton, you should use mlprof.cm.  Note the line in
the Makefile for the mlprof (aka $(NAME)) target.

	$(MLTON) $(FLAGS) $(NAME).cm

So, you could also just do "make mlprof".

To type check with SML/NJ, do

	CM.make "sources.cm";

> On  an  unrelated  note, is there now way to have access to the standard top-
> level and basis structures (like TextIO) in a program which uses  code  which
> requires the MLton library?

The basis structures are all packaged in the Pervasive structure, so,
e.g. Pervasive.TextIO should do the trick.


-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0
_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel