]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/matita/matitacLib.ml
Big commit to let Ferruccio try the merge_coercion patch.
[helm.git] / helm / matita / matitacLib.ml
index b2c3e9a323070ca26c2c5c2aef159ce52d66ad8c..1f9dad80f7dbcf1815dbdf7123c6a7032a7e5945 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 
@@ -123,7 +123,7 @@ let go () =
   CicEnvironment.set_trust (* environment trust *)
     (let trust = Helm_registry.get_bool "matita.environment_trust" in
      fun _ -> trust);
-  status := Some (ref (Lazy.force MatitaEngine.initial_status));
+  status := Some (ref (MatitaSync.init ()));
   Sys.catch_break true;
   interactive_loop ()
 
@@ -131,7 +131,7 @@ let main ~mode =
   MatitaInit.initialize_all ();
   (* must be called after init since args are set by cmdline parsing *)
   let fname = fname () in
-  status := Some (ref (Lazy.force MatitaEngine.initial_status));
+  status := Some (ref (MatitaSync.init ()));
   Sys.catch_break true;
   let origcb = HLog.get_log_callback () in
   let newcb tag s =
@@ -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 =