]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/matita/matitacLib.ml
eval_from_stream_greedy finally got rid of!
[helm.git] / helm / matita / matitacLib.ml
index b2c3e9a323070ca26c2c5c2aef159ce52d66ad8c..355ceed6044385e3e325ca9f73008b11ac26f37d 100644 (file)
@@ -98,7 +98,7 @@ let rec interactive_loop () =
   let str = Ulexing.from_utf8_channel stdin in
   try
     run_script str 
-      (MatitaEngine.eval_from_stream_greedy
+      (MatitaEngine.eval_from_stream ~prompt:true
       ~include_paths:(Helm_registry.get_list Helm_registry.string
         "matita.includes"))
   with 
@@ -154,11 +154,12 @@ let main ~mode =
         | "stdin" -> stdin
         | fname -> open_in fname) in
     let include_paths =
-     Helm_registry.get_list Helm_registry.string "matita.includes"
-    in
-    run_script is 
-      (MatitaEngine.eval_from_stream ~include_paths
-        ~clean_baseuri:(not (Helm_registry.get_bool "matita.preserve")));
+     Helm_registry.get_list Helm_registry.string "matita.includes" in
+    (try
+      run_script is 
+       (MatitaEngine.eval_from_stream ~include_paths
+         ~clean_baseuri:(not (Helm_registry.get_bool "matita.preserve")))
+     with End_of_file -> ());
     let elapsed = Unix.time () -. time in
     let tm = Unix.gmtime elapsed in
     let sec =