[MLton-commit] r4178
Stephen Weeks
MLton@mlton.org
Tue, 8 Nov 2005 15:01:53 -0800
With mlton -stop f, always use forward / for path separator. That
allows all our Makefiles (which use mlton -stop f) to work without
having to do sed hackery.
----------------------------------------------------------------------
U mlton/trunk/mlton/main/main.fun
----------------------------------------------------------------------
Modified: mlton/trunk/mlton/main/main.fun
===================================================================
--- mlton/trunk/mlton/main/main.fun 2005-11-08 22:58:45 UTC (rev 4177)
+++ mlton/trunk/mlton/main/main.fun 2005-11-08 23:01:51 UTC (rev 4178)
@@ -901,6 +901,13 @@
(MLton.GC.pack ()
; compileCSO (List.concat [!outputs, csoFiles]))
end
+ fun showFiles (fs: File.t vector) =
+ Vector.foreach
+ (fs, fn f =>
+ print (concat [String.translate
+ (f, fn #"\\" => "/"
+ | c => str c),
+ "\n"]))
fun compileCM input =
let
val files = CM.cm {cmfile = input}
@@ -916,8 +923,7 @@
in
case stop of
Place.Files =>
- List.foreach
- (files, fn f => print (concat [f, "\n"]))
+ showFiles (Vector.fromList files)
| Place.SML => saveSML (maybeOut ".sml")
| _ =>
(if !keepSML
@@ -970,9 +976,8 @@
val _ =
case stop of
Place.Files =>
- Vector.foreach
- (Compile.sourceFilesMLB {input = file}, fn f =>
- print (concat [f, "\n"]))
+ showFiles
+ (Compile.sourceFilesMLB {input = file})
| Place.SML => saveSML (maybeOut ".sml")
| Place.TypeCheck =>
trace (Top, "Type Check SML")