removed obsolete Posix/Signal compatibility wrappers;
authorwenzelm
Fri, 03 Oct 2008 21:06:37 +0200
changeset 28489 404649964f09
parent 28488 18fea7e88ea1
child 28490 40c3f900c457
removed obsolete Posix/Signal compatibility wrappers; plain process_id function; adapted to recent changes in Pure;
src/Pure/ML-Systems/mosml.ML
--- a/src/Pure/ML-Systems/mosml.ML	Fri Oct 03 21:06:36 2008 +0200
+++ b/src/Pure/ML-Systems/mosml.ML	Fri Oct 03 21:06:37 2008 +0200
@@ -40,6 +40,7 @@
 
 use "ML-Systems/exn.ML";
 use "ML-Systems/universal.ML";
+use "ML-Systems/thread_dummy.ML";
 use "ML-Systems/multithreading.ML";
 use "ML-Systems/time_limit.ML";
 use "ML-Systems/ml_name_space.ML";
@@ -86,7 +87,11 @@
 structure OS =
 struct
   open OS
-  structure Process = Process
+  structure Process =
+  struct
+    open Process
+    fun sleep _ = raise Fail "OS.Process.sleep undefined"
+  end;
   structure FileSys = FileSys
 end;
 
@@ -155,6 +160,17 @@
   fun inputLine is =
     let val s = TextIO.inputLine is
     in if s = "" then NONE else SOME s end;
+  fun getOutstream _ = ();
+  structure StreamIO =
+  struct
+    fun setBufferMode _ = ();
+  end
+end;
+
+structure IO =
+struct
+  open IO;
+  val BLOCK_BUF = ();
 end;
 
 
@@ -230,7 +246,7 @@
 val cd = OS.FileSys.chDir;
 val pwd = OS.FileSys.getDir;
 
-val string_of_pid = Int.toString;
+val process_id = Int.toString o Posix.ProcEnv.getpid;
 
 fun getenv var =
   (case Process.getEnv var of