removed garbage;
authorwenzelm
Wed, 01 Jun 1994 15:47:27 +0200
changeset 413 2a1554524ad5
parent 412 216624270b80
child 414 9dca566d6d96
removed garbage; adapted to new ThySyn (interface for 'user sections');
src/Pure/Thy/ROOT.ML
--- a/src/Pure/Thy/ROOT.ML	Wed Jun 01 15:46:11 1994 +0200
+++ b/src/Pure/Thy/ROOT.ML	Wed Jun 01 15:47:27 1994 +0200
@@ -9,34 +9,24 @@
 (* FIXME remove (still needed by HOL/Datatype.ML) *)
 use "scan.ML"; use "parse.ML";
 
+
 use "thy_scan.ML";
 use "thy_parse.ML";
-use "thy_read.ML";
 
 structure ThyScan = ThyScanFun(Scanner);
 structure ThyParse = ThyParseFun(structure Symtab = Symtab
   and ThyScan = ThyScan);
-structure ThyRead = ThyReadFun(structure ThyParse = ThyParse);
-open ThyRead;
 
-
-(* FIXME tmp hack *)
+use "thy_syn.ML";
+use "thy_read.ML";
 
-fun eval txt =
-  let
-    val tmp_name = "/tmp/.eval.tmp";
-    val tmp_file = open_out tmp_name;
-  in
-    output (tmp_file, txt);
-    close_out tmp_file;
-    use tmp_name;
-    delete_file tmp_name
-  end;
+structure ThySyn = ThySynFun(val user_keywords = [] and user_sections = []);
+structure Readthy = ReadthyFUN(structure ThySyn = ThySyn);
+open Readthy;
 
+fun init_thy_reader () =
+  use_string
+   ["structure Readthy = ReadthyFUN(structure ThySyn = ThySyn);",
+    "Readthy.loaded_thys := ! loaded_thys;",
+    "open Readthy;"];
 
-fun init_thy_reader () = 
-  eval   (* FIXME use_string *)
-    "structure ThyRead = ThyReadFun(structure ThyParse = ThyParse);\n\
-    \ThyRead.loaded_thys := ! loaded_thys;\n\
-    \open ThyRead;\n";
-