]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/matitaWiki.ml
beginning to see the light
[helm.git] / matita / matitaWiki.ml
index b5dc5ccf76396cef091d592a34e3e61a359b7115..87e9a44178a47a18b5bad6f9e9b3961e0825e71f 100644 (file)
@@ -66,13 +66,9 @@ let clean_exit n =
   match !grafite_status with
      [] -> exit n
    | grafite_status::_ ->
-      try
-       let baseuri = GrafiteTypes.get_string_option grafite_status "baseuri" in
+       let baseuri = GrafiteTypes.get_baseuri grafite_status in
        LibraryClean.clean_baseuris ~verbose:false [baseuri];
        exit n
-      with GrafiteTypes.Option_error("baseuri", "not found") ->
-       (* no baseuri ==> nothing to clean yet *)
-       exit n
 
 let terminate n =
  let terminator = String.make 1 (Char.chr 249) in
@@ -174,7 +170,7 @@ let rec interactive_loop () =
           | _ -> ()
         in
          run_script str 
-           (MatitaEngine.eval_from_stream ~first_statement_only:true ~prompt:false
+           (MatitaEngine.eval_from_stream ~first_statement_only:true 
            ~include_paths:(Lazy.force include_paths) ~watch_statuses) ;
          interactive_loop (Some (List.length !lexicon_status))
   with 
@@ -248,10 +244,11 @@ let main () =
     else
      begin
        let baseuri =
-        GrafiteTypes.get_string_option
-         (match !grafite_status with
+        GrafiteTypes.get_baseuri 
+           (match !grafite_status with
              [] -> assert false
-           | s::_ -> s) "baseuri" in
+           | s::_ -> s)
+       in
        let moo_fname = 
          LibraryMisc.obj_file_of_baseuri 
            ~must_exist:false ~baseuri ~writable:true