X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fmatita%2Fmatita.ml;h=b39eb85313030bb475af71efe000d7f53b27e7ab;hb=910c252965fe17d6b5af92e4658e7d02bac82d58;hp=58d404888d7bde1e178185eaf21833651518689b;hpb=397b5f9d848e63a9703a1f90faf9869092ec8893;p=helm.git diff --git a/helm/software/matita/matita.ml b/helm/software/matita/matita.ml index 58d404888..b39eb8531 100644 --- a/helm/software/matita/matita.ml +++ b/helm/software/matita/matita.ml @@ -65,7 +65,6 @@ let script = (fun ~title ~message -> MatitaGtkMisc.ask_confirmation ~title ~message ~parent:gui#main#toplevel ()) - ~develcreator:gui#createDevelopment () in gui#sourceView#source_buffer#begin_not_undoable_action (); @@ -233,6 +232,10 @@ let _ = (fun _ -> GrafiteDisambiguator.only_one_pass := false); addDebugItem "enable only one disambiguation pass" (fun _ -> GrafiteDisambiguator.only_one_pass := true); + addDebugItem "always show all disambiguation errors" + (fun _ -> MatitaGui.all_disambiguation_passes := true); + addDebugItem "prune disambiguation errors" + (fun _ -> MatitaGui.all_disambiguation_passes := false); addDebugSeparator (); (* ZACK moved to the View menu addDebugItem "enable coercions hiding" @@ -250,8 +253,13 @@ let _ = List.iter (fun (s,t,ul) -> HLog.debug - ((String.concat "," (List.map UriManager.name_of_uri ul)) ^ ":" - ^ CoercDb.name_of_carr s ^ " -> " ^ CoercDb.name_of_carr t)) + ((String.concat "," + (List.map + (fun u,saturations,_ -> + UriManager.name_of_uri u ^ + "(" ^ string_of_int saturations ^ ")") + ul)) ^ ":" + ^ CoercDb.string_of_carr s ^ " -> " ^ CoercDb.string_of_carr t)) (CoercDb.to_list ())); addDebugSeparator (); let mview () = (MatitaMathView.sequentsViewer_instance ())#cicMathView in @@ -265,46 +273,25 @@ let _ = end (** Debugging }}} *) - (** {2 Command line parsing} *) - -let set_matita_mode () = - let matita_mode = - if Filename.basename Sys.argv.(0) = "cicbrowser" || - Filename.basename Sys.argv.(0) = "cicbrowser.opt" - then "cicbrowser" - else "matita" - in - Helm_registry.set "matita.mode" matita_mode - (** {2 Main} *) let _ = - set_matita_mode (); at_exit (fun () -> print_endline "\nThanks for using Matita!\n"); Sys.catch_break true; let args = Helm_registry.get_list Helm_registry.string "matita.args" in - if Helm_registry.get "matita.mode" = "cicbrowser" then (* cicbrowser *) - let browser = MatitaMathView.cicBrowser () in - let uri = match args with [] -> "cic:/" | _ -> String.concat " " args in - browser#loadInput uri - else begin (* matita *) - (try gui#loadScript (List.hd args) with Failure _ -> ()); - gui#main#mainWin#show (); - end; + (try gui#loadScript (List.hd args) with Failure _ -> ()); + gui#main#mainWin#show (); try - GtkThread.main () + GtkThread.main () with Sys.Break -> Sys.set_signal Sys.sigint (Sys.Signal_handle (fun _ -> prerr_endline "Still cleaning the library: don't be impatient!")); prerr_endline "Matita is cleaning up. Please wait."; - try - let baseuri = - GrafiteTypes.get_string_option - (MatitaScript.current ())#grafite_status "baseuri" - in + let baseuri = + GrafiteTypes.get_baseuri (MatitaScript.current ())#grafite_status + in LibraryClean.clean_baseuris [baseuri] - with GrafiteTypes.Option_error _ -> () (* vim:set foldmethod=marker: *)