src/Pure/ML-Systems/polyml_old_compiler4.ML
changeset 31350 f20a61cec3d4
parent 31349 2261c8781f73
parent 31322 526e149999cc
child 31351 b8d856545a02
child 31352 b3b534f06c2d
--- a/src/Pure/ML-Systems/polyml_old_compiler4.ML	Sun May 31 21:59:33 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-(*  Title:      Pure/ML-Systems/polyml_old_compiler4.ML
-
-Runtime compilation -- for old PolyML.compiler (version 4.x).
-*)
-
-fun use_text ({tune_source, print, error, ...}: use_context) (line: int, name) verbose txt =
-  let
-    val in_buffer = ref (explode (tune_source txt));
-    val out_buffer = ref ([]: string list);
-    fun output () = implode (rev (case ! out_buffer of "\n" :: cs => cs | cs => cs));
-
-    fun get () =
-      (case ! in_buffer of
-        [] => ""
-      | c :: cs => (in_buffer := cs; c));
-    fun put s = out_buffer := s :: ! out_buffer;
-
-    fun exec () =
-      (case ! in_buffer of
-        [] => ()
-      | _ => (PolyML.compiler (get, put) (); exec ()));
-  in
-    exec () handle exn =>
-      (error ((if name = "" then "" else "Error in " ^ name ^ "\n") ^ output ()); raise exn);
-    if verbose then print (output ()) else ()
-  end;
-
-fun use_file context verbose name =
-  let
-    val instream = TextIO.openIn name;
-    val txt = Exn.release (Exn.capture TextIO.inputAll instream before TextIO.closeIn instream);
-  in use_text context (1, name) verbose txt end;