[MLton-commit] r7071

Matthew Fluet fluet at mlton.org
Wed Apr 8 05:33:22 PDT 2009


More robust support for building under SML/NJ and Poly/ML
----------------------------------------------------------------------

U   mlton/trunk/Makefile
U   mlton/trunk/bin/mlton-script
A   mlton/trunk/lib/basis-stubs-for-polyml/sources.use
D   mlton/trunk/lib/mlton/sources.use
U   mlton/trunk/lib/mlton-stubs/mlton.sig
U   mlton/trunk/lib/mlton-stubs/mlton.sml
U   mlton/trunk/lib/mlton-stubs/sources.cm
U   mlton/trunk/lib/mlton-stubs-for-polyml/mlton.sml
A   mlton/trunk/lib/mlton-stubs-for-polyml/sources.use
U   mlton/trunk/lib/mlton-stubs-for-smlnj/mlton.sml
U   mlton/trunk/mlton/Makefile
U   mlton/trunk/mlton/call-main.sml
A   mlton/trunk/mlton/main/export-mlton.sml
A   mlton/trunk/mlton/main/export-smlnj.sml
D   mlton/trunk/mlton/main/export.sig
D   mlton/trunk/mlton/main/export.sml
U   mlton/trunk/mlton/main/main.fun
U   mlton/trunk/mlton/main/main.sig
U   mlton/trunk/mlton/main/sources.cm
U   mlton/trunk/mlton/main/sources.mlb
A   mlton/trunk/mlton/mlton-polyml.use
A   mlton/trunk/mlton/mlton-smlnj.cm
U   mlton/trunk/mlton/mlton-stubs.cm
U   mlton/trunk/mlton/mlton.cm
D   mlton/trunk/mlton/sources.use

----------------------------------------------------------------------

Modified: mlton/trunk/Makefile
===================================================================
--- mlton/trunk/Makefile	2009-04-08 12:33:16 UTC (rev 7070)
+++ mlton/trunk/Makefile	2009-04-08 12:33:20 UTC (rev 7071)
@@ -165,27 +165,6 @@
 			>/dev/null;				\
 	done
 
-.PHONY: nj-mlton
-nj-mlton:
-	$(MAKE) dirs runtime
-	$(MAKE) -C "$(COMP)" nj-mlton
-	$(MAKE) script basis-no-check mlbpathmap targetmap constants libraries-no-check
-	@echo 'Build of MLton succeeded.'
-
-.PHONY: nj-mlton-dual
-nj-mlton-dual:
-	$(MAKE) dirs runtime
-	$(MAKE) -C "$(COMP)" nj-mlton-dual
-	$(MAKE) script basis-no-check mlbpathmap targetmap constants libraries-no-check
-	@echo 'Build of MLton succeeded.'
-
-.PHONY: nj-mlton-quad
-nj-mlton-quad:
-	$(MAKE) dirs runtime
-	$(MAKE) -C "$(COMP)" nj-mlton-quad
-	$(MAKE) script basis-no-check mlbpathmap targetmap constants libraries-no-check
-	@echo 'Build of MLton succeeded.'
-
 .PHONY: mlbpathmap
 mlbpathmap:
 	touch "$(MLBPATHMAP)"
@@ -247,6 +226,28 @@
 	$(CP) "$(SRC)/bin/static-library.bat" "$(LIB)"
 endif
 
+
+.PHONY: smlnj-mlton
+smlnj-mlton:
+	$(MAKE) dirs runtime
+	$(MAKE) -C "$(COMP)" smlnj-mlton
+	$(MAKE) script basis-no-check mlbpathmap targetmap constants libraries-no-check
+	@echo 'Build of MLton succeeded.'
+
+.PHONY: smlnj-mlton-dual
+smlnj-mlton-dual:
+	$(MAKE) dirs runtime
+	$(MAKE) -C "$(COMP)" smlnj-mlton-dual
+	$(MAKE) script basis-no-check mlbpathmap targetmap constants libraries-no-check
+	@echo 'Build of MLton succeeded.'
+
+.PHONY: smlnj-mlton-quad
+smlnj-mlton-quad:
+	$(MAKE) dirs runtime
+	$(MAKE) -C "$(COMP)" smlnj-mlton-quad
+	$(MAKE) script basis-no-check mlbpathmap targetmap constants libraries-no-check
+	@echo 'Build of MLton succeeded.'
+
 .PHONY: targetmap
 targetmap:
 	touch "$(TARGETMAP)"

Modified: mlton/trunk/bin/mlton-script
===================================================================
--- mlton/trunk/bin/mlton-script	2009-04-08 12:33:16 UTC (rev 7070)
+++ mlton/trunk/bin/mlton-script	2009-04-08 12:33:20 UTC (rev 7071)
@@ -17,16 +17,18 @@
 ;;
 esac
 mlton="$lib/mlton-compile$exe"
-world="$lib/world.mlton"
-nj='sml'
+mlton_world="$lib/world.mlton"
+
+smlnj='sml'
 # Try to use the SML/NJ .arch-n-opsys
 if .arch-n-opsys >/dev/null 2>&1; then
         eval `.arch-n-opsys`
-        njHeap="$lib/mlton.$HEAP_SUFFIX"
+        mlton_smlnj_heap="$lib/mlton-smlnj.$HEAP_SUFFIX"
         unset `.arch-n-opsys | sed 's#=[^ ]*##g'`
 else
-        njHeap="$lib/mlton.$HOST_ARCH-$HOST_OS"
+        mlton_smlnj_heap=""
 fi
+
 mlton_polyml="$lib/mlton-polyml$exe"
 
 declare -a rargs
@@ -46,15 +48,25 @@
         ;;
 esac
 
-# If $mlton is executable and $world exists and is not older than
+doitMLton () {
+    exec "$mlton" @MLton load-world "$mlton_world" ram-slop 0.5 "${rargs[@]}" -- "$@"
+}
+doitSMLNJ () {
+    exec "$smlnj" @SMLload="$mlton_smlnj_heap" "$@"
+}
+doitPolyML () {
+    exec "$mlton_polyml" "$@"
+}
+
+# If $mlton is executable and $mlton_world exists and is not older than
 # $njHeap (which exists), then use MLton, otherwise use SML/NJ.
 doit () {
-        if [ -x "$mlton" -a -s "$world" -a ! "$njHeap" -nt "$world" ]; then
-                exec "$mlton" @MLton load-world "$world" ram-slop 0.5 "${rargs[@]}" -- "$@"
-        elif [ -s "$njHeap" ]; then
-                exec "$nj" @SMLload="$njHeap" "$@"
+        if [ -x "$mlton" -a -s "$mlton_world" ]; then
+            doitMLton "$@"
+        elif [ -s "$mlton_smlnj_heap" ]; then
+            doitSMLNJ "$@"
         elif [ -x "$mlton_polyml" ]; then
-                exec "$mlton_polyml" "$@"
+            doitPolyML "$@"
         fi
         echo 'Unable to run MLton.  Check that lib is set properly.' >&2
         exit 1

Added: mlton/trunk/lib/basis-stubs-for-polyml/sources.use
===================================================================
--- mlton/trunk/lib/basis-stubs-for-polyml/sources.use	2009-04-08 12:33:16 UTC (rev 7070)
+++ mlton/trunk/lib/basis-stubs-for-polyml/sources.use	2009-04-08 12:33:20 UTC (rev 7071)
@@ -0,0 +1,5 @@
+use "int.sml";
+use "real.sml";
+use "unsafe.sig";
+use "unsafe.sml";
+use "word.sml";

Deleted: mlton/trunk/lib/mlton/sources.use
===================================================================
--- mlton/trunk/lib/mlton/sources.use	2009-04-08 12:33:16 UTC (rev 7070)
+++ mlton/trunk/lib/mlton/sources.use	2009-04-08 12:33:20 UTC (rev 7071)
@@ -1,210 +0,0 @@
-(* Copyright (C) 2009 Matthew Fluet.
- *
- * MLton is released under a BSD-style license.
- * See the file MLton-LICENSE for details.
- *)
-
-use "../basis-stubs-for-polyml/int.sml";
-use "../basis-stubs-for-polyml/real.sml";
-use "../basis-stubs-for-polyml/unsafe.sig";
-use "../basis-stubs-for-polyml/unsafe.sml";
-use "../basis-stubs-for-polyml/word.sml";
-use "../mlton-stubs-for-polyml/mlton.sml";
-use "../mlton-stubs/thread.sig";
-use "../mlton-stubs/thread.sml";
-use "../mlton-stubs/signal.sig";
-use "../mlton-stubs/vector.sig";
-use "../mlton-stubs/io.sig";
-use "../mlton-stubs/text-io.sig";
-use "../mlton-stubs/socket.sig";
-use "../mlton-stubs/rusage.sig";
-use "../mlton-stubs/random.sig";
-use "../mlton-stubs/profile.sig";
-use "../mlton-stubs/process.sig";
-use "../mlton-stubs/proc-env.sig";
-use "../mlton-stubs/platform.sig";
-use "../mlton-stubs/itimer.sig";
-use "../mlton-stubs/gc.sig";
-use "../mlton-stubs/exn.sig";
-use "../mlton-stubs/array.sig";
-use "../mlton-stubs/mlton.sig";
-use "../mlton-stubs/word.sig";
-use "../mlton-stubs/random.sml";
-use "../mlton-stubs/mlton.sml";
-use "pervasive/pervasive.sml";
-use "basic/error.sig";
-use "basic/error.sml";
-use "basic/exn0.sml";
-use "basic/outstream0.sml";
-use "basic/layout.sig";
-use "basic/relation0.sml";
-use "basic/char0.sig";
-use "basic/char0.sml";
-use "basic/string0.sml";
-use "basic/layout.sml";
-use "basic/substring.sig";
-use "basic/assert.sig";
-use "basic/assert.sml";
-use "basic/list.sig";
-use "basic/fold.sig";
-use "basic/fold.fun";
-use "basic/list.sml";
-use "basic/word.sig";
-use "basic/word8.sml";
-use "basic/max-pow-2-that-divides.fun";
-use "basic/word.sml";
-use "basic/string1.sml";
-use "basic/substring.sml";
-use "basic/outstream.sig";
-use "basic/outstream.sml";
-use "basic/relation.sig";
-use "basic/relation.sml";
-use "basic/order0.sig";
-use "basic/order.sig";
-use "basic/time.sig";
-use "basic/time.sml";
-use "basic/instream.sig";
-use "basic/char.sig";
-use "basic/computation.sig";
-use "basic/trace.sig";
-use "basic/exn.sig";
-use "basic/exn.sml";
-use "basic/date.sig";
-use "basic/date.sml";
-use "basic/pid.sig";
-use "basic/option.sig";
-use "basic/option.sml";
-use "basic/pid.sml";
-use "basic/intermediate-computation.sig";
-use "basic/instream0.sml";
-use "basic/intermediate-computation.sml";
-use "basic/string-map.sig";
-use "basic/string-map.sml";
-use "basic/t.sig";
-use "basic/unit.sig";
-use "basic/unit.sml";
-use "basic/trace.sml";
-use "basic/bool.sig";
-use "basic/bool.sml";
-use "basic/char.sml";
-use "basic/string.sig";
-use "basic/stream.sig";
-use "basic/promise.sig";
-use "basic/promise.sml";
-use "basic/stream.sml";
-use "basic/ring.sig";
-use "basic/ring-with-identity.sig";
-use "basic/euclidean-ring.sig";
-use "basic/integer.sig";
-use "basic/euclidean-ring.fun";
-use "basic/ring.fun";
-use "basic/ordered-ring.sig";
-use "basic/ordered-ring.fun";
-use "basic/power.sml";
-use "basic/ring-with-identity.fun";
-use "basic/integer.fun";
-use "basic/int.sml";
-use "basic/real.sig";
-use "basic/field.sig";
-use "basic/field.fun";
-use "basic/ordered-field.sig";
-use "basic/ordered-field.fun";
-use "basic/real.sml";
-use "basic/random.sig";
-use "basic/random.sml";
-use "basic/vector.sig";
-use "basic/vector.fun";
-use "basic/vector.sml";
-use "basic/array.sig";
-use "basic/array.fun";
-use "basic/array.sml";
-use "basic/binary-search.sig";
-use "basic/binary-search.sml";
-use "basic/hash-set.sig";
-use "basic/hash-set.sml";
-use "basic/string.sml";
-use "basic/instream.sml";
-use "basic/file.sig";
-use "basic/file.sml";
-use "basic/signal.sml";
-use "basic/process.sig";
-use "basic/dir.sig";
-use "basic/dir.sml";
-use "basic/function.sig";
-use "basic/function.sml";
-use "basic/file-desc.sig";
-use "basic/file-desc.sml";
-use "basic/process.sml";
-use "basic/append-list.sig";
-use "basic/append-list.sml";
-use "basic/property-list.sig";
-use "basic/ref.sig";
-use "basic/ref.sml";
-use "basic/het-container.sig";
-use "basic/property-list.fun";
-use "basic/het-container.fun";
-use "basic/property.sig";
-use "basic/property.fun";
-use "basic/dot-color.sml";
-use "basic/dot.sig";
-use "basic/dot.sml";
-use "basic/tree.sig";
-use "basic/counter.sig";
-use "basic/counter.sml";
-use "basic/tree.sml";
-use "basic/int-inf.sig";
-use "basic/int-inf.sml";
-use "basic/control.sig";
-use "basic/control.fun";
-use "basic/queue.sig";
-use "basic/two-list-queue.sml";
-use "basic/array2.sig";
-use "basic/array2.sml";
-use "basic/env.sig";
-use "basic/env.fun";
-use "basic/unique-id.sig";
-use "basic/unique-id.fun";
-use "basic/clearable-promise.sig";
-use "basic/clearable-promise.sml";
-use "basic/justify.sig";
-use "basic/justify.sml";
-use "basic/directed-graph.sig";
-use "basic/directed-graph.sml";
-use "basic/large-word.sml";
-use "basic/quick-sort.sig";
-use "basic/insertion-sort.sig";
-use "basic/insertion-sort.sml";
-use "basic/quick-sort.sml";
-use "basic/unique-set.sig";
-use "basic/unique-set.fun";
-use "basic/fixed-point.sig";
-use "basic/fixed-point.sml";
-use "basic/mono-vector.fun";
-use "basic/result.sig";
-use "basic/result.sml";
-use "basic/regexp.sig";
-use "basic/regexp.sml";
-use "basic/popt.sig";
-use "basic/popt.sml";
-use "basic/sexp.sig";
-use "basic/sexp.sml";
-use "basic/choice-pattern.sig";
-use "basic/choice-pattern.sml";
-use "basic/escape.sig";
-use "basic/escape.sml";
-use "basic/buffer.sig";
-use "basic/buffer.sml";
-use "basic/socket.sml";
-use "basic/inet-sock.sml";
-use "basic/word8-array-slice.sml";
-use "set/disjoint.sig";
-use "set/disjoint.fun";
-use "set/set.sig";
-use "set/unordered.fun";
-use "set/ordered-unique-set.fun";
-use "env/mono-env.sig";
-use "env/basic-env-to-env.fun";
-use "env/mono-env.fun";
-use "env/finite-function.sig";
-use "env/poly-cache.sig";
-use "env/poly-cache.fun";

Modified: mlton/trunk/lib/mlton-stubs/mlton.sig
===================================================================
--- mlton/trunk/lib/mlton-stubs/mlton.sig	2009-04-08 12:33:16 UTC (rev 7070)
+++ mlton/trunk/lib/mlton-stubs/mlton.sig	2009-04-08 12:33:20 UTC (rev 7071)
@@ -48,5 +48,5 @@
 (*       structure Weak: MLTON_WEAK *)
 (*       structure Word: MLTON_WORD *)
 (*       structure Word8: MLTON_WORD *)
-(*       structure World: MLTON_WORLD *)
+      structure World: MLTON_WORLD
    end

Modified: mlton/trunk/lib/mlton-stubs/mlton.sml
===================================================================
--- mlton/trunk/lib/mlton-stubs/mlton.sml	2009-04-08 12:33:16 UTC (rev 7070)
+++ mlton/trunk/lib/mlton-stubs/mlton.sml	2009-04-08 12:33:20 UTC (rev 7071)
@@ -490,10 +490,10 @@
 
       structure World =
          struct
-            datatype status = Original | Clone
+            datatype status = datatype MLton.World.status
+            val save = MLton.World.save
 
             fun load _ = raise Fail "World.load"
-            fun save _ = raise Fail "World.save"
             fun saveThread _ = raise Fail "World.saveThread"
          end
 

Modified: mlton/trunk/lib/mlton-stubs/sources.cm
===================================================================
--- mlton/trunk/lib/mlton-stubs/sources.cm	2009-04-08 12:33:16 UTC (rev 7070)
+++ mlton/trunk/lib/mlton-stubs/sources.cm	2009-04-08 12:33:20 UTC (rev 7071)
@@ -18,23 +18,24 @@
 ../mlton-stubs-for-smlnj/sources.cm
 #endif
 
+io.sig
+
+thread.sig
+thread.sml
+
 array.sig
 bin-io.sig
 cont.sig
 exn.sig
 finalizable.sig
 gc.sig
-io.sig
 itimer.sig
 platform.sig
 proc-env.sig
 process.sig
 profile.sig
 random.sig
-random.sml
 rusage.sig
-thread.sig
-thread.sml
 signal.sig
 socket.sig
 text-io.sig
@@ -43,5 +44,7 @@
 word.sig
 world.sig
 
+random.sml
+
 mlton.sig
 mlton.sml

Modified: mlton/trunk/lib/mlton-stubs-for-polyml/mlton.sml
===================================================================
--- mlton/trunk/lib/mlton-stubs-for-polyml/mlton.sml	2009-04-08 12:33:16 UTC (rev 7070)
+++ mlton/trunk/lib/mlton-stubs-for-polyml/mlton.sml	2009-04-08 12:33:20 UTC (rev 7071)
@@ -20,4 +20,9 @@
             fun setMessages (b : bool) = ()
             fun pack () = collect ()
          end
+      structure World =
+         struct
+            datatype status = Clone | Original
+            val save = fn _ => raise Fail "MLton.World.save"
+         end
    end

Added: mlton/trunk/lib/mlton-stubs-for-polyml/sources.use
===================================================================
--- mlton/trunk/lib/mlton-stubs-for-polyml/sources.use	2009-04-08 12:33:16 UTC (rev 7070)
+++ mlton/trunk/lib/mlton-stubs-for-polyml/sources.use	2009-04-08 12:33:20 UTC (rev 7071)
@@ -0,0 +1 @@
+use "mlton.sml";

Modified: mlton/trunk/lib/mlton-stubs-for-smlnj/mlton.sml
===================================================================
--- mlton/trunk/lib/mlton-stubs-for-smlnj/mlton.sml	2009-04-08 12:33:16 UTC (rev 7070)
+++ mlton/trunk/lib/mlton-stubs-for-smlnj/mlton.sml	2009-04-08 12:33:20 UTC (rev 7071)
@@ -20,4 +20,9 @@
             fun setMessages b = SMLofNJ.Internals.GC.messages b
             fun pack () = collect ()
          end
+      structure World =
+         struct
+            datatype status = Clone | Original
+            val save = fn _ => raise Fail "MLton.World.save"
+         end
    end

Modified: mlton/trunk/mlton/Makefile
===================================================================
--- mlton/trunk/mlton/Makefile	2009-04-08 12:33:16 UTC (rev 7070)
+++ mlton/trunk/mlton/Makefile	2009-04-08 12:33:20 UTC (rev 7071)
@@ -103,24 +103,22 @@
 #
 # The following rebuilds the heap file for the SML/NJ compiled version
 # of MLton.
-# It requires that you have SMLNJ/NJ with the Compilation Manager (CM)
-# installed.  You may need to replace the following with 'sml-cm'.
 #
 SMLNJ	:= sml
 
-.PHONY: nj-mlton
-nj-mlton: $(SOURCES)
+.PHONY: smlnj-mlton
+smlnj-mlton: $(SOURCES)
 	(									\
 		echo 'SMLofNJ.Internals.GC.messages false;';			\
 		echo '#set CM.Control.verbose false;';				\
 		echo '#set CM.Control.warn_obsolete false;';			\
 		echo 'Control.polyEqWarn := false;';				\
-		echo 'CM.make "sources.cm";';					\
-		echo 'Export.exportNJ("$(LIB)/mlton");'				\
+		echo 'CM.make "mlton-smlnj.cm";';				\
+		echo 'ExportSMLNJ.exportSMLNJ("$(LIB)/mlton-smlnj");'		\
 	) | "$(SMLNJ)"
 
-.PHONY: nj-mlton-dual
-nj-mlton-dual: $(SOURCES)
+.PHONY: smlnj-mlton-dual
+smlnj-mlton-dual: $(SOURCES)
 	(									\
 		echo 'SMLofNJ.Internals.GC.messages false;';			\
 		echo '#set CM.Control.verbose false;';				\
@@ -128,12 +126,12 @@
 		echo 'Control.polyEqWarn := false;';				\
 		echo 'val _ = CM.Server.start {cmd = (CommandLine.name (), ["@CMslave"]), name = "server1", pathtrans = NONE, pref = 0};';\
 		echo 'val _ = CM.Server.start {cmd = (CommandLine.name (), ["@CMslave"]), name = "server2", pathtrans = NONE, pref = 0};';\
-		echo 'CM.make "sources.cm";';					\
-		echo 'Export.exportNJ("$(LIB)/mlton");'				\
+		echo 'CM.make "mlton-smlnj.cm";';				\
+		echo 'ExportSMLNJ.exportSMLNJ("$(LIB)/mlton-smlnj");'		\
 	) | "$(SMLNJ)"
 
-.PHONY: nj-mlton-quad
-nj-mlton-quad: $(SOURCES)
+.PHONY: smlnj-mlton-quad
+smlnj-mlton-quad: $(SOURCES)
 	(									\
 		echo 'SMLofNJ.Internals.GC.messages false;';			\
 		echo '#set CM.Control.verbose false;';				\
@@ -143,12 +141,12 @@
 		echo 'val _ = CM.Server.start {cmd = (CommandLine.name (), ["@CMslave"]), name = "server2", pathtrans = NONE, pref = 0};';\
 		echo 'val _ = CM.Server.start {cmd = (CommandLine.name (), ["@CMslave"]), name = "server3", pathtrans = NONE, pref = 0};';\
 		echo 'val _ = CM.Server.start {cmd = (CommandLine.name (), ["@CMslave"]), name = "server4", pathtrans = NONE, pref = 0};';\
-		echo 'CM.make "sources.cm";';					\
-		echo 'Export.exportNJ("$(LIB)/mlton");'				\
+		echo 'CM.make "mlton-smlnj.cm";';				\
+		echo 'ExportSMLNJ.exportSMLNJ("$(LIB)/mlton-smlnj");'		\
 	) | "$(SMLNJ)"
 
-.PHONY: nj-whole
-nj-whole: $(SOURCES)
+.PHONY: smlnj-whole
+smlnj-whole: $(SOURCES)
 	(									\
 		echo 'SMLofNJ.Internals.GC.messages false;';			\
 		echo '#set CM.Control.verbose false;';				\
@@ -165,7 +163,7 @@
 			grep -v 'mlton-stubs-for-smlnj' |			\
 			grep -v 'mlton-stubs' | xargs cat;	 		\
 		echo 'in';							\
-		echo 'Export.exportNJ("$(LIB)/mlton");'				\
+		echo 'ExportSMLNJ.exportSMLNJ("$(LIB)/mlton-smlnj");'		\
 		echo 'end';							\
 	) >mlton.whole.sml
 	"$(SMLNJ)" <mlton.whole.sml
@@ -177,14 +175,30 @@
 POLYML	:= poly
 
 .PHONY: polyml-mlton
-polyml-mlton: $(SOURCES)
+polyml-mlton: mlton-polyml.use $(SOURCES)
 	(									\
-		echo 'use "sources.use";';					\
-		echo 'PolyML.export("mlton-polyml", Main.mainAuto);';		\
+		echo 'use "mlton-polyml.use";';					\
+		echo 'PolyML.export("mlton-polyml", Main.mainWrapped);';	\
 	) | "$(POLYML)"
 	$(CC) -o $(LIB)/mlton-polyml mlton-polyml.o -lpolymain -lpolyml
 	rm -f mlton-polyml.o
 
+mlton-polyml.use:
+	(									\
+		cat ../lib/basis-stubs-for-polyml/sources.use |			\
+			sed 's|use "\(.*\)";|../lib/basis-stubs-for-polyml/\1|'; \
+		mlton -stop f mlton-stubs.cm | grep 'mlyacc';			\
+		cat ../lib/mlton-stubs-for-polyml/sources.use |			\
+			sed 's|use "\(.*\)";|../lib/mlton-stubs-for-polyml/\1|'; \
+		mlton -stop f mlton-stubs.cm | grep 'mlton-stubs';		\
+		mlton -stop f mlton-stubs.cm |					\
+			grep -v 'upgrade-basis.sml' |				\
+			grep -v 'mlton-stubs' |					\
+			grep -v 'mlyacc' |					\
+			grep -v 'main/export-mlton.sml' |			\
+			grep -v 'call-main.sml';				\
+	) | sed 's|\(.*\)|use "\1";|' > mlton-polyml.use
+
 .PHONY: warn
 warn:
 	mlton -stop tc -default-ann 'warnUnused true' $(FILE) \

Modified: mlton/trunk/mlton/call-main.sml
===================================================================
--- mlton/trunk/mlton/call-main.sml	2009-04-08 12:33:16 UTC (rev 7070)
+++ mlton/trunk/mlton/call-main.sml	2009-04-08 12:33:20 UTC (rev 7071)
@@ -7,4 +7,4 @@
  * See the file MLton-LICENSE for details.
  *)
 
-val _ = Export.exportMLton ()
+val _ = ExportMLton.exportMLton ()

Copied: mlton/trunk/mlton/main/export-mlton.sml (from rev 7070, mlton/trunk/mlton/main/export.sml)
===================================================================
--- mlton/trunk/mlton/main/export.sml	2009-04-08 12:33:16 UTC (rev 7070)
+++ mlton/trunk/mlton/main/export-mlton.sml	2009-04-08 12:33:20 UTC (rev 7071)
@@ -0,0 +1,20 @@
+(* Copyright (C) 2009 Matthew Fluet.
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+structure ExportMLton =
+   struct
+      fun exportMLton (): unit =
+         case CommandLine.arguments () of
+            [worldFile] =>
+               let
+                  open MLton.World OS.Process
+               in
+                  case save (worldFile ^ ".mlton") of
+                     Original => exit success
+                   | Clone => Main.mainWrapped ()
+               end
+          | _ => Error.bug "usage: exportMLton worldFile"
+   end

Copied: mlton/trunk/mlton/main/export-smlnj.sml (from rev 7070, mlton/trunk/mlton/main/export.sig)
===================================================================
--- mlton/trunk/mlton/main/export.sig	2009-04-08 12:33:16 UTC (rev 7070)
+++ mlton/trunk/mlton/main/export-smlnj.sml	2009-04-08 12:33:20 UTC (rev 7071)
@@ -0,0 +1,11 @@
+(* Copyright (C) 2009 Matthew Fluet.
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+structure ExportSMLNJ =
+   struct
+      fun exportSMLNJ (file: string): unit =
+         SMLofNJ.exportFn (file, Main.main)
+   end

Deleted: mlton/trunk/mlton/main/export.sig
===================================================================
--- mlton/trunk/mlton/main/export.sig	2009-04-08 12:33:16 UTC (rev 7070)
+++ mlton/trunk/mlton/main/export.sig	2009-04-08 12:33:20 UTC (rev 7071)
@@ -1,11 +0,0 @@
-(* Copyright (C) 2009 Matthew Fluet.
- *
- * MLton is released under a BSD-style license.
- * See the file MLton-LICENSE for details.
- *)
-
-signature EXPORT =
-   sig
-      val exportMLton: unit -> unit
-      val exportNJ: File.t -> unit
-   end

Deleted: mlton/trunk/mlton/main/export.sml
===================================================================
--- mlton/trunk/mlton/main/export.sml	2009-04-08 12:33:16 UTC (rev 7070)
+++ mlton/trunk/mlton/main/export.sml	2009-04-08 12:33:20 UTC (rev 7071)
@@ -1,18 +0,0 @@
-(* Copyright (C) 2009 Matthew Fluet.
- *
- * MLton is released under a BSD-style license.
- * See the file MLton-LICENSE for details.
- *)
-
-structure Export : EXPORT =
-   struct
-
-      fun exportNJ (file: File.t): unit =
-         SMLofNJ.exportFn (file, Main.main)
-
-      fun exportMLton (): unit =
-         case CommandLine.arguments () of
-            [worldFile] =>
-               SMLofNJ.exportFn (worldFile, Main.main)
-          | _ => Error.bug "usage: exportMLton worldFile"
-   end

Modified: mlton/trunk/mlton/main/main.fun
===================================================================
--- mlton/trunk/mlton/main/main.fun	2009-04-08 12:33:16 UTC (rev 7070)
+++ mlton/trunk/mlton/main/main.fun	2009-04-08 12:33:20 UTC (rev 7071)
@@ -1540,8 +1540,9 @@
 
 val main = fn (_, args) => commandLine args
 
-val mainAuto = fn () =>
-   (OS.Process.exit o main)
-   (CommandLine.name (), CommandLine.arguments ())
+val mainWrapped = fn () =>
+   OS.Process.exit
+   (main (CommandLine.name (), CommandLine.arguments ())
+    handle _ => OS.Process.failure)
 
 end

Modified: mlton/trunk/mlton/main/main.sig
===================================================================
--- mlton/trunk/mlton/main/main.sig	2009-04-08 12:33:16 UTC (rev 7070)
+++ mlton/trunk/mlton/main/main.sig	2009-04-08 12:33:20 UTC (rev 7071)
@@ -16,5 +16,5 @@
       include MAIN_STRUCTS
 
       val main: string * string list -> OS.Process.status
-      val mainAuto: unit -> unit
+      val mainWrapped: unit -> 'a
    end

Modified: mlton/trunk/mlton/main/sources.cm
===================================================================
--- mlton/trunk/mlton/main/sources.cm	2009-04-08 12:33:16 UTC (rev 7070)
+++ mlton/trunk/mlton/main/sources.cm	2009-04-08 12:33:20 UTC (rev 7071)
@@ -10,7 +10,11 @@
 Group
 
 structure Main
-structure Export
+#if (defined (SMLNJ_VERSION))
+structure ExportSMLNJ
+#else
+structure ExportMLton
+#endif
 
 is
 
@@ -36,5 +40,8 @@
 main.sig
 main.fun
 main.sml
-export.sig
-export.sml
+#if (defined (SMLNJ_VERSION))
+export-smlnj.sml
+#else
+export-mlton.sml
+#endif

Modified: mlton/trunk/mlton/main/sources.mlb
===================================================================
--- mlton/trunk/mlton/main/sources.mlb	2009-04-08 12:33:16 UTC (rev 7070)
+++ mlton/trunk/mlton/main/sources.mlb	2009-04-08 12:33:20 UTC (rev 7071)
@@ -30,9 +30,7 @@
    main.sig
    main.fun
    main.sml
-   export.sig
-   export.sml
+   export-mlton.sml
 in
-   structure Main
-   structure Export
+   structure ExportMLton
 end

Copied: mlton/trunk/mlton/mlton-polyml.use (from rev 7070, mlton/trunk/mlton/sources.use)
===================================================================
--- mlton/trunk/mlton/sources.use	2009-04-08 12:33:16 UTC (rev 7070)
+++ mlton/trunk/mlton/mlton-polyml.use	2009-04-08 12:33:20 UTC (rev 7071)
@@ -0,0 +1,615 @@
+use "../lib/basis-stubs-for-polyml/int.sml";
+use "../lib/basis-stubs-for-polyml/real.sml";
+use "../lib/basis-stubs-for-polyml/unsafe.sig";
+use "../lib/basis-stubs-for-polyml/unsafe.sml";
+use "../lib/basis-stubs-for-polyml/word.sml";
+use "../lib/mlyacc/base.sig";
+use "../lib/mlyacc/join.sml";
+use "../lib/mlyacc/lrtable.sml";
+use "../lib/mlyacc/stream.sml";
+use "../lib/mlyacc/parser2.sml";
+use "../lib/mlton-stubs-for-polyml/mlton.sml";
+use "../lib/mlton-stubs/io.sig";
+use "../lib/mlton-stubs/thread.sig";
+use "../lib/mlton-stubs/thread.sml";
+use "../lib/mlton-stubs/array.sig";
+use "../lib/mlton-stubs/bin-io.sig";
+use "../lib/mlton-stubs/cont.sig";
+use "../lib/mlton-stubs/exn.sig";
+use "../lib/mlton-stubs/finalizable.sig";
+use "../lib/mlton-stubs/gc.sig";
+use "../lib/mlton-stubs/itimer.sig";
+use "../lib/mlton-stubs/platform.sig";
+use "../lib/mlton-stubs/proc-env.sig";
+use "../lib/mlton-stubs/process.sig";
+use "../lib/mlton-stubs/profile.sig";
+use "../lib/mlton-stubs/random.sig";
+use "../lib/mlton-stubs/rusage.sig";
+use "../lib/mlton-stubs/signal.sig";
+use "../lib/mlton-stubs/socket.sig";
+use "../lib/mlton-stubs/text-io.sig";
+use "../lib/mlton-stubs/vector.sig";
+use "../lib/mlton-stubs/weak.sig";
+use "../lib/mlton-stubs/word.sig";
+use "../lib/mlton-stubs/world.sig";
+use "../lib/mlton-stubs/random.sml";
+use "../lib/mlton-stubs/mlton.sig";
+use "../lib/mlton-stubs/mlton.sml";
+use "../lib/mlton/pervasive/pervasive.sml";
+use "../lib/mlton/basic/error.sig";
+use "../lib/mlton/basic/error.sml";
+use "../lib/mlton/basic/exn0.sml";
+use "../lib/mlton/basic/outstream0.sml";
+use "../lib/mlton/basic/layout.sig";
+use "../lib/mlton/basic/relation0.sml";
+use "../lib/mlton/basic/char0.sig";
+use "../lib/mlton/basic/char0.sml";
+use "../lib/mlton/basic/string0.sml";
+use "../lib/mlton/basic/layout.sml";
+use "../lib/mlton/basic/substring.sig";
+use "../lib/mlton/basic/assert.sig";
+use "../lib/mlton/basic/assert.sml";
+use "../lib/mlton/basic/list.sig";
+use "../lib/mlton/basic/fold.sig";
+use "../lib/mlton/basic/fold.fun";
+use "../lib/mlton/basic/list.sml";
+use "../lib/mlton/basic/word.sig";
+use "../lib/mlton/basic/word8.sml";
+use "../lib/mlton/basic/max-pow-2-that-divides.fun";
+use "../lib/mlton/basic/word.sml";
+use "../lib/mlton/basic/string1.sml";
+use "../lib/mlton/basic/substring.sml";
+use "../lib/mlton/basic/outstream.sig";
+use "../lib/mlton/basic/outstream.sml";
+use "../lib/mlton/basic/relation.sig";
+use "../lib/mlton/basic/relation.sml";
+use "../lib/mlton/basic/order0.sig";
+use "../lib/mlton/basic/order.sig";
+use "../lib/mlton/basic/time.sig";
+use "../lib/mlton/basic/time.sml";
+use "../lib/mlton/basic/instream.sig";
+use "../lib/mlton/basic/char.sig";
+use "../lib/mlton/basic/computation.sig";
+use "../lib/mlton/basic/trace.sig";
+use "../lib/mlton/basic/exn.sig";
+use "../lib/mlton/basic/exn.sml";
+use "../lib/mlton/basic/date.sig";
+use "../lib/mlton/basic/date.sml";
+use "../lib/mlton/basic/pid.sig";
+use "../lib/mlton/basic/option.sig";
+use "../lib/mlton/basic/option.sml";
+use "../lib/mlton/basic/pid.sml";
+use "../lib/mlton/basic/intermediate-computation.sig";
+use "../lib/mlton/basic/instream0.sml";
+use "../lib/mlton/basic/intermediate-computation.sml";
+use "../lib/mlton/basic/string-map.sig";
+use "../lib/mlton/basic/string-map.sml";
+use "../lib/mlton/basic/t.sig";
+use "../lib/mlton/basic/unit.sig";
+use "../lib/mlton/basic/unit.sml";
+use "../lib/mlton/basic/trace.sml";
+use "../lib/mlton/basic/bool.sig";
+use "../lib/mlton/basic/bool.sml";
+use "../lib/mlton/basic/char.sml";
+use "../lib/mlton/basic/string.sig";
+use "../lib/mlton/basic/stream.sig";
+use "../lib/mlton/basic/promise.sig";
+use "../lib/mlton/basic/promise.sml";
+use "../lib/mlton/basic/stream.sml";
+use "../lib/mlton/basic/ring.sig";
+use "../lib/mlton/basic/ring-with-identity.sig";
+use "../lib/mlton/basic/euclidean-ring.sig";
+use "../lib/mlton/basic/integer.sig";
+use "../lib/mlton/basic/euclidean-ring.fun";
+use "../lib/mlton/basic/ring.fun";
+use "../lib/mlton/basic/ordered-ring.sig";
+use "../lib/mlton/basic/ordered-ring.fun";
+use "../lib/mlton/basic/power.sml";
+use "../lib/mlton/basic/ring-with-identity.fun";
+use "../lib/mlton/basic/integer.fun";
+use "../lib/mlton/basic/int.sml";
+use "../lib/mlton/basic/real.sig";
+use "../lib/mlton/basic/field.sig";
+use "../lib/mlton/basic/field.fun";
+use "../lib/mlton/basic/ordered-field.sig";
+use "../lib/mlton/basic/ordered-field.fun";
+use "../lib/mlton/basic/real.sml";
+use "../lib/mlton/basic/random.sig";
+use "../lib/mlton/basic/random.sml";
+use "../lib/mlton/basic/vector.sig";
+use "../lib/mlton/basic/vector.fun";
+use "../lib/mlton/basic/vector.sml";
+use "../lib/mlton/basic/array.sig";
+use "../lib/mlton/basic/array.fun";
+use "../lib/mlton/basic/array.sml";
+use "../lib/mlton/basic/binary-search.sig";
+use "../lib/mlton/basic/binary-search.sml";
+use "../lib/mlton/basic/hash-set.sig";
+use "../lib/mlton/basic/hash-set.sml";
+use "../lib/mlton/basic/string.sml";
+use "../lib/mlton/basic/instream.sml";
+use "../lib/mlton/basic/file.sig";
+use "../lib/mlton/basic/file.sml";
+use "../lib/mlton/basic/signal.sml";
+use "../lib/mlton/basic/process.sig";
+use "../lib/mlton/basic/dir.sig";
+use "../lib/mlton/basic/dir.sml";
+use "../lib/mlton/basic/function.sig";
+use "../lib/mlton/basic/function.sml";
+use "../lib/mlton/basic/file-desc.sig";
+use "../lib/mlton/basic/file-desc.sml";
+use "../lib/mlton/basic/process.sml";
+use "../lib/mlton/basic/append-list.sig";
+use "../lib/mlton/basic/append-list.sml";
+use "../lib/mlton/basic/property-list.sig";
+use "../lib/mlton/basic/ref.sig";
+use "../lib/mlton/basic/ref.sml";
+use "../lib/mlton/basic/het-container.sig";
+use "../lib/mlton/basic/property-list.fun";
+use "../lib/mlton/basic/het-container.fun";
+use "../lib/mlton/basic/property.sig";
+use "../lib/mlton/basic/property.fun";
+use "../lib/mlton/basic/dot-color.sml";
+use "../lib/mlton/basic/dot.sig";
+use "../lib/mlton/basic/dot.sml";
+use "../lib/mlton/basic/tree.sig";
+use "../lib/mlton/basic/counter.sig";
+use "../lib/mlton/basic/counter.sml";
+use "../lib/mlton/basic/tree.sml";
+use "../lib/mlton/basic/int-inf.sig";
+use "../lib/mlton/basic/int-inf.sml";
+use "../lib/mlton/basic/control.sig";
+use "../lib/mlton/basic/control.fun";
+use "../lib/mlton/basic/queue.sig";
+use "../lib/mlton/basic/two-list-queue.sml";
+use "../lib/mlton/basic/array2.sig";
+use "../lib/mlton/basic/array2.sml";
+use "../lib/mlton/basic/env.sig";
+use "../lib/mlton/basic/env.fun";
+use "../lib/mlton/basic/unique-id.sig";
+use "../lib/mlton/basic/unique-id.fun";
+use "../lib/mlton/basic/clearable-promise.sig";
+use "../lib/mlton/basic/clearable-promise.sml";
+use "../lib/mlton/basic/justify.sig";
+use "../lib/mlton/basic/justify.sml";
+use "../lib/mlton/basic/directed-graph.sig";
+use "../lib/mlton/basic/directed-graph.sml";
+use "../lib/mlton/basic/large-word.sml";
+use "../lib/mlton/basic/quick-sort.sig";
+use "../lib/mlton/basic/insertion-sort.sig";
+use "../lib/mlton/basic/insertion-sort.sml";
+use "../lib/mlton/basic/quick-sort.sml";
+use "../lib/mlton/basic/unique-set.sig";
+use "../lib/mlton/basic/unique-set.fun";
+use "../lib/mlton/basic/fixed-point.sig";
+use "../lib/mlton/basic/fixed-point.sml";
+use "../lib/mlton/basic/mono-vector.fun";
+use "../lib/mlton/basic/result.sig";
+use "../lib/mlton/basic/result.sml";
+use "../lib/mlton/basic/regexp.sig";
+use "../lib/mlton/basic/regexp.sml";
+use "../lib/mlton/basic/popt.sig";
+use "../lib/mlton/basic/popt.sml";
+use "../lib/mlton/basic/sexp.sig";
+use "../lib/mlton/basic/sexp.sml";
+use "../lib/mlton/basic/choice-pattern.sig";
+use "../lib/mlton/basic/choice-pattern.sml";
+use "../lib/mlton/basic/escape.sig";
+use "../lib/mlton/basic/escape.sml";
+use "../lib/mlton/basic/buffer.sig";
+use "../lib/mlton/basic/buffer.sml";
+use "../lib/mlton/basic/socket.sml";
+use "../lib/mlton/basic/inet-sock.sml";
+use "../lib/mlton/basic/word8-array-slice.sml";
+use "../lib/mlton/set/disjoint.sig";
+use "../lib/mlton/set/disjoint.fun";
+use "../lib/mlton/set/set.sig";
+use "../lib/mlton/set/unordered.fun";
+use "../lib/mlton/set/ordered-unique-set.fun";
+use "../lib/mlton/env/mono-env.sig";
+use "../lib/mlton/env/basic-env-to-env.fun";
+use "../lib/mlton/env/mono-env.fun";
+use "../lib/mlton/env/finite-function.sig";
+use "../lib/mlton/env/poly-cache.sig";
+use "../lib/mlton/env/poly-cache.fun";
+use "control/bits.sml";
+use "control/control-flags.sig";
+use "control/control-flags.sml";
+use "control/source-pos.sig";
+use "control/source-pos.sml";
+use "control/region.sig";
+use "control/region.sml";
+use "control/source.sig";
+use "control/source.sml";
+use "control/control.sig";
+use "control/control.sml";
+use "control/system.sig";
+use "control/system.sml";
+use "control/pretty.sig";
+use "control/pretty.sml";
+use "ast/admits-equality.sig";
+use "ast/admits-equality.fun";
+use "ast/wrapped.sig";
+use "ast/ast-const.sig";
+use "ast/ast-const.fun";
+use "ast/symbol.sig";
+use "ast/symbol.fun";
+use "ast/ast-id.sig";
+use "ast/ast-id.fun";
+use "ast/field.sig";
+use "ast/field.fun";
+use "ast/char-size.sig";
+use "ast/char-size.fun";
+use "ast/int-size.sig";
+use "ast/int-size.fun";
+use "ast/longid.sig";
+use "ast/longid.fun";
+use "ast/prim-cons.sig";
+use "ast/prim-cons.fun";
+use "ast/real-size.sig";
+use "ast/real-size.fun";
+use "ast/word-size.sig";
+use "ast/word-size.fun";
+use "ast/tycon-kind.sig";
+use "ast/tycon-kind.fun";
+use "ast/prim-tycons.sig";
+use "ast/prim-tycons.fun";
+use "ast/record.sig";
+use "ast/record.fun";
+use "ast/tyvar.sig";
+use "ast/tyvar.fun";
+use "ast/ast-atoms.sig";
+use "ast/ast-atoms.fun";
+use "ast/ast-core.sig";
+use "ast/ast-core.fun";
+use "ast/ast-modules.sig";
+use "ast/ast-modules.fun";
+use "ast/ast-programs.sig";
+use "ast/ast-programs.fun";
+use "ast/ast-mlbs.sig";
+use "ast/ast-mlbs.fun";
+use "ast/ast.sig";
+use "ast/ast.fun";
+use "atoms/id.sig";
+use "atoms/id.fun";
+use "atoms/con-.sig";
+use "atoms/con-.fun";
+use "atoms/word-x.sig";
+use "atoms/word-x.fun";
+use "atoms/real-x.sig";
+use "atoms/real-x.fun";
+use "atoms/word-x-vector.sig";
+use "atoms/word-x-vector.fun";
+use "atoms/c-type.sig";
+use "atoms/c-type.fun";
+use "atoms/label.sig";
+use "atoms/c-function.sig";
+use "atoms/c-function.fun";
+use "atoms/const-type.sig";
+use "atoms/const-type.fun";
+use "atoms/const.sig";
+use "atoms/const.fun";
+use "atoms/prim.sig";
+use "atoms/prim.fun";
+use "atoms/ffi.sig";
+use "atoms/ffi.fun";
+use "atoms/func.sig";
+use "atoms/generic-scheme.sig";
+use "atoms/generic-scheme.fun";
+use "atoms/profile-label.sig";
+use "atoms/profile-label.fun";
+use "atoms/source-info.sig";
+use "atoms/source-info.fun";
+use "atoms/profile-exp.sig";
+use "atoms/profile-exp.fun";
+use "atoms/tycon.sig";
+use "atoms/tycon.fun";
+use "atoms/type-ops.sig";
+use "atoms/type-ops.fun";
+use "atoms/use-name.fun";
+use "atoms/var.sig";
+use "atoms/var.fun";
+use "atoms/atoms.sig";
+use "atoms/atoms.fun";
+use "atoms/hash-type.sig";
+use "atoms/hash-type.fun";
+use "ssa/equatable.sig";
+use "ssa/equatable.sml";
+use "ssa/ssa-tree.sig";
+use "ssa/ssa-tree2.sig";
+use "ssa/ssa-tree.fun";
+use "ssa/ssa-tree2.fun";
+use "ssa/direct-exp.sig";
+use "ssa/direct-exp.fun";
+use "ssa/analyze.sig";
+use "ssa/analyze2.sig";
+use "ssa/analyze.fun";
+use "ssa/analyze2.fun";
+use "ssa/type-check.sig";
+use "ssa/type-check2.sig";
+use "ssa/type-check.fun";
+use "ssa/type-check2.fun";
+use "ssa/prepasses.sig";
+use "ssa/prepasses2.sig";
+use "ssa/prepasses.fun";
+use "ssa/prepasses2.fun";
+use "ssa/shrink.sig";
+use "ssa/shrink2.sig";
+use "ssa/shrink.fun";
+use "ssa/shrink2.fun";
+use "ssa/flat-lattice.sig";
+use "ssa/flat-lattice.fun";
+use "ssa/n-point-lattice.sig";
+use "ssa/n-point-lattice.fun";
+use "ssa/two-point-lattice.sig";
+use "ssa/two-point-lattice.fun";
+use "ssa/three-point-lattice.sig";
+use "ssa/three-point-lattice.fun";
+use "ssa/common-arg.sig";
+use "ssa/common-arg.fun";
+use "ssa/common-block.sig";
+use "ssa/common-block.fun";
+use "ssa/common-subexp.sig";
+use "ssa/common-subexp.fun";
+use "ssa/global.sig";
+use "ssa/global.fun";
+use "ssa/multi.sig";
+use "ssa/multi.fun";
+use "ssa/constant-propagation.sig";
+use "ssa/constant-propagation.fun";
+use "ssa/contify.sig";
+use "ssa/contify.fun";
+use "ssa/deep-flatten.sig";
+use "ssa/deep-flatten.fun";
+use "ssa/flatten.sig";
+use "ssa/flatten.fun";
+use "ssa/inline.sig";
+use "ssa/inline.fun";
+use "ssa/introduce-loops.sig";
+use "ssa/introduce-loops.fun";
+use "ssa/restore.sig";
+use "ssa/restore.fun";
+use "ssa/known-case.sig";
+use "ssa/known-case.fun";
+use "ssa/local-flatten.sig";
+use "ssa/local-flatten.fun";
+use "ssa/local-ref.sig";
+use "ssa/local-ref.fun";
+use "ssa/loop-invariant.sig";
+use "ssa/loop-invariant.fun";
+use "ssa/poly-equal.sig";
+use "ssa/poly-equal.fun";
+use "ssa/poly-hash.sig";
+use "ssa/poly-hash.fun";
+use "ssa/profile.sig";
+use "ssa/profile.fun";
+use "ssa/profile2.sig";
+use "ssa/profile2.fun";
+use "ssa/redundant-tests.sig";
+use "ssa/redundant-tests.fun";
+use "ssa/redundant.sig";
+use "ssa/redundant.fun";
+use "ssa/ref-flatten.sig";
+use "ssa/ref-flatten.fun";
+use "ssa/remove-unused.sig";
+use "ssa/remove-unused2.sig";
+use "ssa/remove-unused.fun";
+use "ssa/remove-unused2.fun";
+use "ssa/simplify-types.sig";
+use "ssa/simplify-types.fun";
+use "ssa/useless.sig";
+use "ssa/useless.fun";
+use "ssa/zone.sig";
+use "ssa/zone.fun";
+use "ssa/simplify.sig";
+use "ssa/simplify2.sig";
+use "ssa/simplify.fun";
+use "ssa/simplify2.fun";
+use "ssa/ssa.sig";
+use "ssa/ssa2.sig";
+use "ssa/ssa.fun";
+use "ssa/ssa2.fun";
+use "ssa/ssa-to-ssa2.sig";
+use "ssa/ssa-to-ssa2.fun";
+use "backend/runtime.sig";
+use "backend/runtime.fun";
+use "backend/objptr-tycon.sig";
+use "backend/objptr-tycon.fun";
+use "backend/object-type.sig";
+use "backend/scale.sig";
+use "backend/scale.fun";
+use "backend/rep-type.sig";
+use "backend/rep-type.fun";
+use "backend/switch.sig";
+use "backend/switch.fun";
+use "backend/err.sml";
+use "backend/rssa.sig";
+use "backend/rssa.fun";
+use "backend/machine.sig";
+use "backend/machine.fun";
+use "backend/representation.sig";
+use "backend/packed-representation.fun";
+use "backend/ssa-to-rssa.sig";
+use "backend/ssa-to-rssa.fun";
+use "backend/implement-handlers.sig";
+use "backend/implement-handlers.fun";
+use "backend/implement-profiling.sig";
+use "backend/implement-profiling.fun";
+use "backend/limit-check.sig";
+use "backend/limit-check.fun";
+use "backend/signal-check.sig";
+use "backend/signal-check.fun";
+use "backend/live.sig";
+use "backend/live.fun";
+use "backend/allocate-registers.sig";
+use "backend/allocate-registers.fun";
+use "backend/equivalence-graph.sig";
+use "backend/equivalence-graph.fun";
+use "backend/chunkify.sig";
+use "backend/chunkify.fun";
+use "backend/parallel-move.sig";
+use "backend/parallel-move.fun";
+use "backend/backend.sig";
+use "backend/backend.fun";
+use "xml/xml-type.sig";
+use "xml/xml-tree.sig";
+use "xml/xml-tree.fun";
+use "xml/type-check.sig";
+use "xml/type-check.fun";
+use "xml/scc-funs.sig";
+use "xml/scc-funs.fun";
+use "xml/simplify-types.sig";
+use "xml/simplify-types.fun";
+use "xml/shrink.sig";
+use "xml/shrink.fun";
+use "xml/xml-simplify.sig";
+use "xml/xml-simplify.fun";
+use "xml/xml.sig";
+use "xml/xml.fun";
+use "xml/sxml-exns.sig";
+use "xml/monomorphise.sig";
+use "xml/monomorphise.fun";
+use "xml/sxml-tree.sig";
+use "xml/implement-exceptions.sig";
+use "xml/implement-exceptions.fun";
+use "xml/implement-suffix.sig";
+use "xml/implement-suffix.fun";
+use "xml/polyvariance.sig";
+use "xml/polyvariance.fun";
+use "xml/cps-transform.sig";
+use "xml/cps-transform.fun";
+use "xml/sxml-simplify.sig";
+use "xml/sxml-simplify.fun";
+use "xml/sxml.sig";
+use "xml/sxml.fun";
+use "closure-convert/abstract-value.sig";
+use "closure-convert/abstract-value.fun";
+use "closure-convert/globalize.sig";
+use "closure-convert/globalize.fun";
+use "closure-convert/lambda-free.sig";
+use "closure-convert/lambda-free.fun";
+use "closure-convert/closure-convert.sig";
+use "closure-convert/closure-convert.fun";
+use "cm/lexer.sig";
+use "cm/lexer.sml";
+use "cm/parse.sig";
+use "cm/parse.sml";
+use "cm/cm.sig";
+use "cm/cm.sml";
+use "codegen/c-codegen/c-codegen.sig";
+use "codegen/c-codegen/c-codegen.fun";
+use "codegen/bytecode/bytecode.sig";
+use "codegen/bytecode/bytecode.fun";
+use "codegen/x86-codegen/peephole.sig";
+use "codegen/x86-codegen/peephole.fun";
+use "codegen/x86-codegen/x86.sig";
+use "codegen/x86-codegen/x86.fun";
+use "codegen/x86-codegen/x86-pseudo.sig";
+use "codegen/x86-codegen/x86-mlton-basic.sig";
+use "codegen/x86-codegen/x86-mlton-basic.fun";
+use "codegen/x86-codegen/x86-liveness.sig";
+use "codegen/x86-codegen/x86-liveness.fun";
+use "codegen/x86-codegen/x86-mlton.sig";
+use "codegen/x86-codegen/x86-mlton.fun";
+use "codegen/x86-codegen/x86-allocate-registers.sig";
+use "codegen/x86-codegen/x86-allocate-registers.fun";
+use "codegen/x86-codegen/x86-entry-transfer.sig";
+use "codegen/x86-codegen/x86-entry-transfer.fun";
+use "codegen/x86-codegen/x86-jump-info.sig";
+use "codegen/x86-codegen/x86-jump-info.fun";
+use "codegen/x86-codegen/x86-loop-info.sig";
+use "codegen/x86-codegen/x86-loop-info.fun";
+use "codegen/x86-codegen/x86-live-transfers.sig";
+use "codegen/x86-codegen/x86-live-transfers.fun";
+use "codegen/x86-codegen/x86-generate-transfers.sig";
+use "codegen/x86-codegen/x86-generate-transfers.fun";
+use "codegen/x86-codegen/x86-simplify.sig";
+use "codegen/x86-codegen/x86-simplify.fun";
+use "codegen/x86-codegen/x86-translate.sig";
+use "codegen/x86-codegen/x86-translate.fun";
+use "codegen/x86-codegen/x86-validate.sig";
+use "codegen/x86-codegen/x86-validate.fun";
+use "codegen/x86-codegen/x86-codegen.sig";
+use "codegen/x86-codegen/x86-codegen.fun";
+use "codegen/amd64-codegen/peephole.sig";
+use "codegen/amd64-codegen/peephole.fun";
+use "codegen/amd64-codegen/amd64.sig";
+use "codegen/amd64-codegen/amd64.fun";
+use "codegen/amd64-codegen/amd64-pseudo.sig";
+use "codegen/amd64-codegen/amd64-mlton-basic.sig";
+use "codegen/amd64-codegen/amd64-mlton-basic.fun";
+use "codegen/amd64-codegen/amd64-liveness.sig";
+use "codegen/amd64-codegen/amd64-liveness.fun";
+use "codegen/amd64-codegen/amd64-mlton.sig";
+use "codegen/amd64-codegen/amd64-mlton.fun";
+use "codegen/amd64-codegen/amd64-allocate-registers.sig";
+use "codegen/amd64-codegen/amd64-allocate-registers.fun";
+use "codegen/amd64-codegen/amd64-entry-transfer.sig";
+use "codegen/amd64-codegen/amd64-entry-transfer.fun";
+use "codegen/amd64-codegen/amd64-jump-info.sig";
+use "codegen/amd64-codegen/amd64-jump-info.fun";
+use "codegen/amd64-codegen/amd64-loop-info.sig";
+use "codegen/amd64-codegen/amd64-loop-info.fun";
+use "codegen/amd64-codegen/amd64-live-transfers.sig";
+use "codegen/amd64-codegen/amd64-live-transfers.fun";
+use "codegen/amd64-codegen/amd64-generate-transfers.sig";
+use "codegen/amd64-codegen/amd64-generate-transfers.fun";
+use "codegen/amd64-codegen/amd64-simplify.sig";
+use "codegen/amd64-codegen/amd64-simplify.fun";
+use "codegen/amd64-codegen/amd64-translate.sig";
+use "codegen/amd64-codegen/amd64-translate.fun";
+use "codegen/amd64-codegen/amd64-validate.sig";
+use "codegen/amd64-codegen/amd64-validate.fun";
+use "codegen/amd64-codegen/amd64-codegen.sig";
+use "codegen/amd64-codegen/amd64-codegen.fun";
+use "core-ml/core-ml.sig";
+use "core-ml/core-ml.fun";
+use "core-ml/dead-code.sig";
+use "core-ml/dead-code.fun";
+use "match-compile/nested-pat.sig";
+use "match-compile/nested-pat.fun";
+use "match-compile/match-compile.sig";
+use "match-compile/match-compile.fun";
+use "defunctorize/defunctorize.sig";
+use "defunctorize/defunctorize.fun";
+use "elaborate/decs.sig";
+use "elaborate/decs.fun";
+use "elaborate/type-env.sig";
+use "elaborate/type-env.fun";
+use "elaborate/interface.sig";
+use "elaborate/interface.fun";
+use "elaborate/elaborate-env.sig";
+use "elaborate/elaborate-env.fun";
+use "elaborate/precedence-parse.sig";
+use "elaborate/precedence-parse.fun";
+use "elaborate/scope.sig";
+use "elaborate/scope.fun";
+use "elaborate/elaborate-core.sig";
+use "elaborate/elaborate-core.fun";
+use "elaborate/elaborate-sigexp.sig";
+use "elaborate/elaborate-sigexp.fun";
+use "elaborate/elaborate-modules.sig";
+use "elaborate/elaborate-modules.fun";
+use "elaborate/elaborate-programs.sig";
+use "elaborate/elaborate-programs.fun";
+use "elaborate/elaborate-mlbs.sig";
+use "elaborate/elaborate-mlbs.fun";
+use "elaborate/elaborate.sig";
+use "elaborate/elaborate.fun";
+use "front-end/ml.grm.sig";
+use "front-end/ml.grm.sml";
+use "front-end/ml.lex.sml";
+use "front-end/front-end.sig";
+use "front-end/front-end.fun";
+use "front-end/mlb.grm.sig";
+use "front-end/mlb.grm.sml";
+use "front-end/mlb.lex.sml";
+use "front-end/mlb-front-end.sig";
+use "front-end/mlb-front-end.fun";
+use "main/lookup-constant.sig";
+use "main/lookup-constant.fun";
+use "main/compile.sig";
+use "main/compile.fun";
+use "main/main.sig";
+use "main/main.fun";
+use "main/main.sml";

Added: mlton/trunk/mlton/mlton-smlnj.cm
===================================================================
--- mlton/trunk/mlton/mlton-smlnj.cm	2009-04-08 12:33:16 UTC (rev 7070)
+++ mlton/trunk/mlton/mlton-smlnj.cm	2009-04-08 12:33:20 UTC (rev 7071)
@@ -0,0 +1,9 @@
+(* Copyright (C) 2009 Matthew Fluet.
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+Group is
+
+sources.cm

Modified: mlton/trunk/mlton/mlton-stubs.cm
===================================================================
--- mlton/trunk/mlton/mlton-stubs.cm	2009-04-08 12:33:16 UTC (rev 7070)
+++ mlton/trunk/mlton/mlton-stubs.cm	2009-04-08 12:33:20 UTC (rev 7071)
@@ -8,5 +8,6 @@
 
 Group is
 
+upgrade-basis.sml
 ../lib/mlton-stubs/sources.cm
 mlton.cm

Modified: mlton/trunk/mlton/mlton.cm
===================================================================
--- mlton/trunk/mlton/mlton.cm	2009-04-08 12:33:16 UTC (rev 7070)
+++ mlton/trunk/mlton/mlton.cm	2009-04-08 12:33:20 UTC (rev 7071)
@@ -8,7 +8,6 @@
 
 Group is
 
-upgrade-basis.sml
 (* Need to elaborate ML-Yacc library in Basis Library, not MLton library. *)
 ../lib/mlyacc/ml-yacc-lib.cm
 sources.cm

Deleted: mlton/trunk/mlton/sources.use
===================================================================
--- mlton/trunk/mlton/sources.use	2009-04-08 12:33:16 UTC (rev 7070)
+++ mlton/trunk/mlton/sources.use	2009-04-08 12:33:20 UTC (rev 7071)
@@ -1,619 +0,0 @@
-(* Copyright (C) 2009 Matthew Fluet.
- *
- * MLton is released under a BSD-style license.
- * See the file MLton-LICENSE for details.
- *)
-
-use "../lib/basis-stubs-for-polyml/int.sml";
-use "../lib/basis-stubs-for-polyml/real.sml";
-use "../lib/basis-stubs-for-polyml/unsafe.sig";
-use "../lib/basis-stubs-for-polyml/unsafe.sml";
-use "../lib/basis-stubs-for-polyml/word.sml";
-
-use "../lib/mlyacc/base.sig";
-use "../lib/mlyacc/join.sml";
-use "../lib/mlyacc/lrtable.sml";
-use "../lib/mlyacc/stream.sml";
-use "../lib/mlyacc/parser2.sml";
-
-use "../lib/mlton-stubs-for-polyml/mlton.sml";
-use "../lib/mlton-stubs/thread.sig";
-use "../lib/mlton-stubs/thread.sml";
-use "../lib/mlton-stubs/signal.sig";
-use "../lib/mlton-stubs/vector.sig";
-use "../lib/mlton-stubs/io.sig";
-use "../lib/mlton-stubs/text-io.sig";
-use "../lib/mlton-stubs/socket.sig";
-use "../lib/mlton-stubs/rusage.sig";
-use "../lib/mlton-stubs/random.sig";
-use "../lib/mlton-stubs/profile.sig";
-use "../lib/mlton-stubs/process.sig";
-use "../lib/mlton-stubs/proc-env.sig";
-use "../lib/mlton-stubs/platform.sig";
-use "../lib/mlton-stubs/itimer.sig";
-use "../lib/mlton-stubs/gc.sig";
-use "../lib/mlton-stubs/exn.sig";
-use "../lib/mlton-stubs/array.sig";
-use "../lib/mlton-stubs/mlton.sig";
-use "../lib/mlton-stubs/word.sig";
-use "../lib/mlton-stubs/random.sml";
-use "../lib/mlton-stubs/mlton.sml";
-
-use "../lib/mlton/pervasive/pervasive.sml";
-use "../lib/mlton/basic/error.sig";
-use "../lib/mlton/basic/error.sml";
-use "../lib/mlton/basic/exn0.sml";
-use "../lib/mlton/basic/outstream0.sml";
-use "../lib/mlton/basic/layout.sig";
-use "../lib/mlton/basic/relation0.sml";
-use "../lib/mlton/basic/char0.sig";
-use "../lib/mlton/basic/char0.sml";
-use "../lib/mlton/basic/string0.sml";
-use "../lib/mlton/basic/layout.sml";
-use "../lib/mlton/basic/substring.sig";
-use "../lib/mlton/basic/assert.sig";
-use "../lib/mlton/basic/assert.sml";
-use "../lib/mlton/basic/list.sig";
-use "../lib/mlton/basic/fold.sig";
-use "../lib/mlton/basic/fold.fun";
-use "../lib/mlton/basic/list.sml";
-use "../lib/mlton/basic/word.sig";
-use "../lib/mlton/basic/word8.sml";
-use "../lib/mlton/basic/max-pow-2-that-divides.fun";
-use "../lib/mlton/basic/word.sml";
-use "../lib/mlton/basic/string1.sml";
-use "../lib/mlton/basic/substring.sml";
-use "../lib/mlton/basic/outstream.sig";
-use "../lib/mlton/basic/outstream.sml";
-use "../lib/mlton/basic/relation.sig";
-use "../lib/mlton/basic/relation.sml";
-use "../lib/mlton/basic/order0.sig";
-use "../lib/mlton/basic/order.sig";
-use "../lib/mlton/basic/time.sig";
-use "../lib/mlton/basic/time.sml";
-use "../lib/mlton/basic/instream.sig";
-use "../lib/mlton/basic/char.sig";
-use "../lib/mlton/basic/computation.sig";
-use "../lib/mlton/basic/trace.sig";
-use "../lib/mlton/basic/exn.sig";
-use "../lib/mlton/basic/exn.sml";
-use "../lib/mlton/basic/date.sig";
-use "../lib/mlton/basic/date.sml";
-use "../lib/mlton/basic/pid.sig";
-use "../lib/mlton/basic/option.sig";
-use "../lib/mlton/basic/option.sml";
-use "../lib/mlton/basic/pid.sml";
-use "../lib/mlton/basic/intermediate-computation.sig";
-use "../lib/mlton/basic/instream0.sml";
-use "../lib/mlton/basic/intermediate-computation.sml";
-use "../lib/mlton/basic/string-map.sig";
-use "../lib/mlton/basic/string-map.sml";
-use "../lib/mlton/basic/t.sig";
-use "../lib/mlton/basic/unit.sig";
-use "../lib/mlton/basic/unit.sml";
-use "../lib/mlton/basic/trace.sml";
-use "../lib/mlton/basic/bool.sig";
-use "../lib/mlton/basic/bool.sml";
-use "../lib/mlton/basic/char.sml";
-use "../lib/mlton/basic/string.sig";
-use "../lib/mlton/basic/stream.sig";
-use "../lib/mlton/basic/promise.sig";
-use "../lib/mlton/basic/promise.sml";
-use "../lib/mlton/basic/stream.sml";
-use "../lib/mlton/basic/ring.sig";
-use "../lib/mlton/basic/ring-with-identity.sig";
-use "../lib/mlton/basic/euclidean-ring.sig";
-use "../lib/mlton/basic/integer.sig";
-use "../lib/mlton/basic/euclidean-ring.fun";
-use "../lib/mlton/basic/ring.fun";
-use "../lib/mlton/basic/ordered-ring.sig";
-use "../lib/mlton/basic/ordered-ring.fun";
-use "../lib/mlton/basic/power.sml";
-use "../lib/mlton/basic/ring-with-identity.fun";
-use "../lib/mlton/basic/integer.fun";
-use "../lib/mlton/basic/int.sml";
-use "../lib/mlton/basic/real.sig";
-use "../lib/mlton/basic/field.sig";
-use "../lib/mlton/basic/field.fun";
-use "../lib/mlton/basic/ordered-field.sig";
-use "../lib/mlton/basic/ordered-field.fun";
-use "../lib/mlton/basic/real.sml";
-use "../lib/mlton/basic/random.sig";
-use "../lib/mlton/basic/random.sml";
-use "../lib/mlton/basic/vector.sig";
-use "../lib/mlton/basic/vector.fun";
-use "../lib/mlton/basic/vector.sml";
-use "../lib/mlton/basic/array.sig";
-use "../lib/mlton/basic/array.fun";
-use "../lib/mlton/basic/array.sml";
-use "../lib/mlton/basic/binary-search.sig";
-use "../lib/mlton/basic/binary-search.sml";
-use "../lib/mlton/basic/hash-set.sig";
-use "../lib/mlton/basic/hash-set.sml";
-use "../lib/mlton/basic/string.sml";
-use "../lib/mlton/basic/instream.sml";
-use "../lib/mlton/basic/file.sig";
-use "../lib/mlton/basic/file.sml";
-use "../lib/mlton/basic/signal.sml";
-use "../lib/mlton/basic/process.sig";
-use "../lib/mlton/basic/dir.sig";
-use "../lib/mlton/basic/dir.sml";
-use "../lib/mlton/basic/function.sig";
-use "../lib/mlton/basic/function.sml";
-use "../lib/mlton/basic/file-desc.sig";
-use "../lib/mlton/basic/file-desc.sml";
-use "../lib/mlton/basic/process.sml";
-use "../lib/mlton/basic/append-list.sig";
-use "../lib/mlton/basic/append-list.sml";
-use "../lib/mlton/basic/property-list.sig";
-use "../lib/mlton/basic/ref.sig";
-use "../lib/mlton/basic/ref.sml";
-use "../lib/mlton/basic/het-container.sig";
-use "../lib/mlton/basic/property-list.fun";
-use "../lib/mlton/basic/het-container.fun";
-use "../lib/mlton/basic/property.sig";
-use "../lib/mlton/basic/property.fun";
-use "../lib/mlton/basic/dot-color.sml";
-use "../lib/mlton/basic/dot.sig";
-use "../lib/mlton/basic/dot.sml";
-use "../lib/mlton/basic/tree.sig";
-use "../lib/mlton/basic/counter.sig";
-use "../lib/mlton/basic/counter.sml";
-use "../lib/mlton/basic/tree.sml";
-use "../lib/mlton/basic/int-inf.sig";
-use "../lib/mlton/basic/int-inf.sml";
-use "../lib/mlton/basic/control.sig";
-use "../lib/mlton/basic/control.fun";
-use "../lib/mlton/basic/queue.sig";
-use "../lib/mlton/basic/two-list-queue.sml";
-use "../lib/mlton/basic/array2.sig";
-use "../lib/mlton/basic/array2.sml";
-use "../lib/mlton/basic/env.sig";
-use "../lib/mlton/basic/env.fun";
-use "../lib/mlton/basic/unique-id.sig";
-use "../lib/mlton/basic/unique-id.fun";
-use "../lib/mlton/basic/clearable-promise.sig";
-use "../lib/mlton/basic/clearable-promise.sml";
-use "../lib/mlton/basic/justify.sig";
-use "../lib/mlton/basic/justify.sml";
-use "../lib/mlton/basic/directed-graph.sig";
-use "../lib/mlton/basic/directed-graph.sml";
-use "../lib/mlton/basic/large-word.sml";
-use "../lib/mlton/basic/quick-sort.sig";
-use "../lib/mlton/basic/insertion-sort.sig";
-use "../lib/mlton/basic/insertion-sort.sml";
-use "../lib/mlton/basic/quick-sort.sml";
-use "../lib/mlton/basic/unique-set.sig";
-use "../lib/mlton/basic/unique-set.fun";
-use "../lib/mlton/basic/fixed-point.sig";
-use "../lib/mlton/basic/fixed-point.sml";
-use "../lib/mlton/basic/mono-vector.fun";
-use "../lib/mlton/basic/result.sig";
-use "../lib/mlton/basic/result.sml";
-use "../lib/mlton/basic/regexp.sig";
-use "../lib/mlton/basic/regexp.sml";
-use "../lib/mlton/basic/popt.sig";
-use "../lib/mlton/basic/popt.sml";
-use "../lib/mlton/basic/sexp.sig";
-use "../lib/mlton/basic/sexp.sml";
-use "../lib/mlton/basic/choice-pattern.sig";
-use "../lib/mlton/basic/choice-pattern.sml";
-use "../lib/mlton/basic/escape.sig";
-use "../lib/mlton/basic/escape.sml";
-use "../lib/mlton/basic/buffer.sig";
-use "../lib/mlton/basic/buffer.sml";
-use "../lib/mlton/basic/socket.sml";
-use "../lib/mlton/basic/inet-sock.sml";
-use "../lib/mlton/basic/word8-array-slice.sml";
-use "../lib/mlton/set/disjoint.sig";
-use "../lib/mlton/set/disjoint.fun";
-use "../lib/mlton/set/set.sig";
-use "../lib/mlton/set/unordered.fun";
-use "../lib/mlton/set/ordered-unique-set.fun";
-use "../lib/mlton/env/mono-env.sig";
-use "../lib/mlton/env/basic-env-to-env.fun";
-use "../lib/mlton/env/mono-env.fun";
-use "../lib/mlton/env/finite-function.sig";
-use "../lib/mlton/env/poly-cache.sig";
-use "../lib/mlton/env/poly-cache.fun";
-use "control/bits.sml";
-use "control/control-flags.sig";
-use "control/control-flags.sml";
-use "control/source-pos.sig";
-use "control/source-pos.sml";
-use "control/region.sig";
-use "control/region.sml";
-use "control/source.sig";
-use "control/source.sml";
-use "control/control.sig";
-use "control/control.sml";
-use "control/system.sig";
-use "control/system.sml";
-use "control/pretty.sig";
-use "control/pretty.sml";
-use "ast/admits-equality.sig";
-use "ast/admits-equality.fun";
-use "ast/wrapped.sig";
-use "ast/ast-const.sig";
-use "ast/ast-const.fun";
-use "ast/symbol.sig";
-use "ast/symbol.fun";
-use "ast/ast-id.sig";
-use "ast/ast-id.fun";
-use "ast/field.sig";
-use "ast/field.fun";
-use "ast/char-size.sig";
-use "ast/char-size.fun";
-use "ast/int-size.sig";
-use "ast/int-size.fun";
-use "ast/longid.sig";
-use "ast/longid.fun";
-use "ast/prim-cons.sig";
-use "ast/prim-cons.fun";
-use "ast/real-size.sig";
-use "ast/real-size.fun";
-use "ast/word-size.sig";
-use "ast/word-size.fun";
-use "ast/tycon-kind.sig";
-use "ast/tycon-kind.fun";
-use "ast/prim-tycons.sig";
-use "ast/prim-tycons.fun";
-use "ast/record.sig";
-use "ast/record.fun";
-use "ast/tyvar.sig";
-use "ast/tyvar.fun";
-use "ast/ast-atoms.sig";
-use "ast/ast-atoms.fun";
-use "ast/ast-core.sig";
-use "ast/ast-core.fun";
-use "ast/ast-modules.sig";
-use "ast/ast-modules.fun";
-use "ast/ast-programs.sig";
-use "ast/ast-programs.fun";
-use "ast/ast-mlbs.sig";
-use "ast/ast-mlbs.fun";
-use "ast/ast.sig";
-use "ast/ast.fun";
-use "atoms/id.sig";
-use "atoms/id.fun";
-use "atoms/con-.sig";
-use "atoms/con-.fun";
-use "atoms/word-x.sig";
-use "atoms/word-x.fun";
-use "atoms/real-x.sig";
-use "atoms/real-x.fun";
-use "atoms/word-x-vector.sig";
-use "atoms/word-x-vector.fun";
-use "atoms/c-type.sig";
-use "atoms/c-type.fun";
-use "atoms/label.sig";
-use "atoms/c-function.sig";
-use "atoms/c-function.fun";
-use "atoms/const-type.sig";
-use "atoms/const-type.fun";
-use "atoms/const.sig";
-use "atoms/const.fun";
-use "atoms/prim.sig";
-use "atoms/prim.fun";
-use "atoms/ffi.sig";
-use "atoms/ffi.fun";
-use "atoms/func.sig";
-use "atoms/generic-scheme.sig";
-use "atoms/generic-scheme.fun";
-use "atoms/profile-label.sig";
-use "atoms/profile-label.fun";
-use "atoms/source-info.sig";
-use "atoms/source-info.fun";
-use "atoms/profile-exp.sig";
-use "atoms/profile-exp.fun";
-use "atoms/tycon.sig";
-use "atoms/tycon.fun";
-use "atoms/type-ops.sig";
-use "atoms/type-ops.fun";
-use "atoms/use-name.fun";
-use "atoms/var.sig";
-use "atoms/var.fun";
-use "atoms/atoms.sig";
-use "atoms/atoms.fun";
-use "atoms/hash-type.sig";
-use "atoms/hash-type.fun";
-use "ssa/equatable.sig";
-use "ssa/equatable.sml";
-use "ssa/ssa-tree.sig";
-use "ssa/ssa-tree2.sig";
-use "ssa/ssa-tree.fun";
-use "ssa/ssa-tree2.fun";
-use "ssa/direct-exp.sig";
-use "ssa/direct-exp.fun";
-use "ssa/analyze.sig";
-use "ssa/analyze2.sig";
-use "ssa/analyze.fun";
-use "ssa/analyze2.fun";
-use "ssa/type-check.sig";
-use "ssa/type-check2.sig";
-use "ssa/type-check.fun";
-use "ssa/type-check2.fun";
-use "ssa/prepasses.sig";
-use "ssa/prepasses2.sig";
-use "ssa/prepasses.fun";
-use "ssa/prepasses2.fun";
-use "ssa/shrink.sig";
-use "ssa/shrink2.sig";
-use "ssa/shrink.fun";
-use "ssa/shrink2.fun";
-use "ssa/flat-lattice.sig";
-use "ssa/flat-lattice.fun";
-use "ssa/n-point-lattice.sig";
-use "ssa/n-point-lattice.fun";
-use "ssa/two-point-lattice.sig";
-use "ssa/two-point-lattice.fun";
-use "ssa/three-point-lattice.sig";
-use "ssa/three-point-lattice.fun";
-use "ssa/common-arg.sig";
-use "ssa/common-arg.fun";
-use "ssa/common-block.sig";
-use "ssa/common-block.fun";
-use "ssa/common-subexp.sig";
-use "ssa/common-subexp.fun";
-use "ssa/global.sig";
-use "ssa/global.fun";
-use "ssa/multi.sig";
-use "ssa/multi.fun";
-use "ssa/constant-propagation.sig";
-use "ssa/constant-propagation.fun";
-use "ssa/contify.sig";
-use "ssa/contify.fun";
-use "ssa/deep-flatten.sig";
-use "ssa/deep-flatten.fun";
-use "ssa/flatten.sig";
-use "ssa/flatten.fun";
-use "ssa/inline.sig";
-use "ssa/inline.fun";
-use "ssa/introduce-loops.sig";
-use "ssa/introduce-loops.fun";
-use "ssa/restore.sig";
-use "ssa/restore.fun";
-use "ssa/known-case.sig";
-use "ssa/known-case.fun";
-use "ssa/local-flatten.sig";
-use "ssa/local-flatten.fun";
-use "ssa/local-ref.sig";
-use "ssa/local-ref.fun";
-use "ssa/loop-invariant.sig";
-use "ssa/loop-invariant.fun";
-use "ssa/poly-equal.sig";
-use "ssa/poly-equal.fun";
-use "ssa/poly-hash.sig";
-use "ssa/poly-hash.fun";
-use "ssa/profile.sig";
-use "ssa/profile.fun";
-use "ssa/profile2.sig";
-use "ssa/profile2.fun";
-use "ssa/redundant-tests.sig";
-use "ssa/redundant-tests.fun";
-use "ssa/redundant.sig";
-use "ssa/redundant.fun";
-use "ssa/ref-flatten.sig";
-use "ssa/ref-flatten.fun";
-use "ssa/remove-unused.sig";
-use "ssa/remove-unused2.sig";
-use "ssa/remove-unused.fun";
-use "ssa/remove-unused2.fun";
-use "ssa/simplify-types.sig";
-use "ssa/simplify-types.fun";
-use "ssa/useless.sig";
-use "ssa/useless.fun";
-use "ssa/zone.sig";
-use "ssa/zone.fun";
-use "ssa/simplify.sig";
-use "ssa/simplify2.sig";
-use "ssa/simplify.fun";
-use "ssa/simplify2.fun";
-use "ssa/ssa.sig";
-use "ssa/ssa2.sig";
-use "ssa/ssa.fun";
-use "ssa/ssa2.fun";
-use "ssa/ssa-to-ssa2.sig";
-use "ssa/ssa-to-ssa2.fun";
-use "backend/runtime.sig";
-use "backend/runtime.fun";
-use "backend/objptr-tycon.sig";
-use "backend/objptr-tycon.fun";
-use "backend/object-type.sig";
-use "backend/scale.sig";
-use "backend/scale.fun";
-use "backend/rep-type.sig";
-use "backend/rep-type.fun";
-use "backend/switch.sig";
-use "backend/switch.fun";
-use "backend/err.sml";
-use "backend/rssa.sig";
-use "backend/rssa.fun";
-use "backend/machine.sig";
-use "backend/machine.fun";
-use "backend/representation.sig";
-use "backend/packed-representation.fun";
-use "backend/ssa-to-rssa.sig";
-use "backend/ssa-to-rssa.fun";
-use "backend/implement-handlers.sig";
-use "backend/implement-handlers.fun";
-use "backend/implement-profiling.sig";
-use "backend/implement-profiling.fun";
-use "backend/limit-check.sig";
-use "backend/limit-check.fun";
-use "backend/signal-check.sig";
-use "backend/signal-check.fun";
-use "backend/live.sig";
-use "backend/live.fun";
-use "backend/allocate-registers.sig";
-use "backend/allocate-registers.fun";
-use "backend/equivalence-graph.sig";
-use "backend/equivalence-graph.fun";
-use "backend/chunkify.sig";
-use "backend/chunkify.fun";
-use "backend/parallel-move.sig";
-use "backend/parallel-move.fun";
-use "backend/backend.sig";
-use "backend/backend.fun";
-use "xml/xml-type.sig";
-use "xml/xml-tree.sig";
-use "xml/xml-tree.fun";
-use "xml/type-check.sig";
-use "xml/type-check.fun";
-use "xml/scc-funs.sig";
-use "xml/scc-funs.fun";
-use "xml/simplify-types.sig";
-use "xml/simplify-types.fun";
-use "xml/shrink.sig";
-use "xml/shrink.fun";
-use "xml/xml-simplify.sig";
-use "xml/xml-simplify.fun";
-use "xml/xml.sig";
-use "xml/xml.fun";
-use "xml/sxml-exns.sig";
-use "xml/monomorphise.sig";
-use "xml/monomorphise.fun";
-use "xml/sxml-tree.sig";
-use "xml/implement-exceptions.sig";
-use "xml/implement-exceptions.fun";
-use "xml/implement-suffix.sig";
-use "xml/implement-suffix.fun";
-use "xml/polyvariance.sig";
-use "xml/polyvariance.fun";
-use "xml/cps-transform.sig";
-use "xml/cps-transform.fun";
-use "xml/sxml-simplify.sig";
-use "xml/sxml-simplify.fun";
-use "xml/sxml.sig";
-use "xml/sxml.fun";
-use "closure-convert/abstract-value.sig";
-use "closure-convert/abstract-value.fun";
-use "closure-convert/globalize.sig";
-use "closure-convert/globalize.fun";
-use "closure-convert/lambda-free.sig";
-use "closure-convert/lambda-free.fun";
-use "closure-convert/closure-convert.sig";
-use "closure-convert/closure-convert.fun";
-use "cm/lexer.sig";
-use "cm/lexer.sml";
-use "cm/parse.sig";
-use "cm/parse.sml";
-use "cm/cm.sig";
-use "cm/cm.sml";
-use "codegen/c-codegen/c-codegen.sig";
-use "codegen/c-codegen/c-codegen.fun";
-use "codegen/bytecode/bytecode.sig";
-use "codegen/bytecode/bytecode.fun";
-use "codegen/x86-codegen/peephole.sig";
-use "codegen/x86-codegen/peephole.fun";
-use "codegen/x86-codegen/x86.sig";
-use "codegen/x86-codegen/x86.fun";
-use "codegen/x86-codegen/x86-pseudo.sig";
-use "codegen/x86-codegen/x86-mlton-basic.sig";
-use "codegen/x86-codegen/x86-mlton-basic.fun";
-use "codegen/x86-codegen/x86-liveness.sig";
-use "codegen/x86-codegen/x86-liveness.fun";
-use "codegen/x86-codegen/x86-mlton.sig";
-use "codegen/x86-codegen/x86-mlton.fun";
-use "codegen/x86-codegen/x86-allocate-registers.sig";
-use "codegen/x86-codegen/x86-allocate-registers.fun";
-use "codegen/x86-codegen/x86-entry-transfer.sig";
-use "codegen/x86-codegen/x86-entry-transfer.fun";
-use "codegen/x86-codegen/x86-jump-info.sig";
-use "codegen/x86-codegen/x86-jump-info.fun";
-use "codegen/x86-codegen/x86-loop-info.sig";
-use "codegen/x86-codegen/x86-loop-info.fun";
-use "codegen/x86-codegen/x86-live-transfers.sig";
-use "codegen/x86-codegen/x86-live-transfers.fun";
-use "codegen/x86-codegen/x86-generate-transfers.sig";
-use "codegen/x86-codegen/x86-generate-transfers.fun";
-use "codegen/x86-codegen/x86-simplify.sig";
-use "codegen/x86-codegen/x86-simplify.fun";
-use "codegen/x86-codegen/x86-translate.sig";
-use "codegen/x86-codegen/x86-translate.fun";
-use "codegen/x86-codegen/x86-validate.sig";
-use "codegen/x86-codegen/x86-validate.fun";
-use "codegen/x86-codegen/x86-codegen.sig";
-use "codegen/x86-codegen/x86-codegen.fun";
-use "codegen/amd64-codegen/peephole.sig";
-use "codegen/amd64-codegen/peephole.fun";
-use "codegen/amd64-codegen/amd64.sig";
-use "codegen/amd64-codegen/amd64.fun";
-use "codegen/amd64-codegen/amd64-pseudo.sig";
-use "codegen/amd64-codegen/amd64-mlton-basic.sig";
-use "codegen/amd64-codegen/amd64-mlton-basic.fun";
-use "codegen/amd64-codegen/amd64-liveness.sig";
-use "codegen/amd64-codegen/amd64-liveness.fun";
-use "codegen/amd64-codegen/amd64-mlton.sig";
-use "codegen/amd64-codegen/amd64-mlton.fun";
-use "codegen/amd64-codegen/amd64-allocate-registers.sig";
-use "codegen/amd64-codegen/amd64-allocate-registers.fun";
-use "codegen/amd64-codegen/amd64-entry-transfer.sig";
-use "codegen/amd64-codegen/amd64-entry-transfer.fun";
-use "codegen/amd64-codegen/amd64-jump-info.sig";
-use "codegen/amd64-codegen/amd64-jump-info.fun";
-use "codegen/amd64-codegen/amd64-loop-info.sig";
-use "codegen/amd64-codegen/amd64-loop-info.fun";
-use "codegen/amd64-codegen/amd64-live-transfers.sig";
-use "codegen/amd64-codegen/amd64-live-transfers.fun";
-use "codegen/amd64-codegen/amd64-generate-transfers.sig";
-use "codegen/amd64-codegen/amd64-generate-transfers.fun";
-use "codegen/amd64-codegen/amd64-simplify.sig";
-use "codegen/amd64-codegen/amd64-simplify.fun";
-use "codegen/amd64-codegen/amd64-translate.sig";
-use "codegen/amd64-codegen/amd64-translate.fun";
-use "codegen/amd64-codegen/amd64-validate.sig";
-use "codegen/amd64-codegen/amd64-validate.fun";
-use "codegen/amd64-codegen/amd64-codegen.sig";
-use "codegen/amd64-codegen/amd64-codegen.fun";
-use "core-ml/core-ml.sig";
-use "core-ml/core-ml



More information about the MLton-commit mailing list