From 7c123bfb1568f90f37cd667332fbf60d4423b983 Mon Sep 17 00:00:00 2001 From: Stefano Zacchiroli Date: Sun, 27 Nov 2005 16:17:36 +0000 Subject: [PATCH] removed dead code (thanks to ocaml 3.09) --- helm/matita/matitaEngine.ml | 3 +-- helm/matita/matitaGtkMisc.ml | 1 - helm/matita/matitaGui.ml | 4 ---- helm/matita/matitaScript.ml | 2 -- helm/matita/matitaSync.ml | 1 - helm/matita/matitamakeLib.ml | 1 - 6 files changed, 1 insertion(+), 11 deletions(-) diff --git a/helm/matita/matitaEngine.ml b/helm/matita/matitaEngine.ml index 72b252140..10d29cac2 100644 --- a/helm/matita/matitaEngine.ml +++ b/helm/matita/matitaEngine.ml @@ -732,7 +732,7 @@ let make_absolute paths path = in try aux paths - with Unix.Unix_error _ as exc -> raise (UnableToInclude path) + with Unix.Unix_error _ -> raise (UnableToInclude path) ;; let eval_command opts status cmd = @@ -789,7 +789,6 @@ let eval_command opts status cmd = "name/uri. This should be fixed!") | _-> command_error "You can't Qed an incomplete theorem" in - let suri = UriManager.string_of_uri uri in if metasenv <> [] then command_error "Proof not completed! metasenv is not empty!"; let name = UriManager.name_of_uri uri in diff --git a/helm/matita/matitaGtkMisc.ml b/helm/matita/matitaGtkMisc.ml index 3c0d1b4c3..c969f1bcd 100644 --- a/helm/matita/matitaGtkMisc.ml +++ b/helm/matita/matitaGtkMisc.ml @@ -340,7 +340,6 @@ let ask_confirmation ~title ~message ?parent () = !rc let report_error ~title ~message ?parent () = - let rc = ref false in let callback _ = () in let buttons = GWindow.Buttons.ok in try diff --git a/helm/matita/matitaGui.ml b/helm/matita/matitaGui.ml index 853168b29..3ea6b4f87 100644 --- a/helm/matita/matitaGui.ml +++ b/helm/matita/matitaGui.ml @@ -439,7 +439,6 @@ class gui () = (fun () -> develList#toplevel#misc#hide()); ignore(develList#toplevel#event#connect#delete (fun _ -> develList#toplevel#misc#hide();true)); - let selected_devel = ref None in connect_menu_item main#developmentsMenuItem (fun () -> refresh_devels_win ();develList#toplevel#misc#show ()); @@ -651,7 +650,6 @@ class gui () = in let loadScript () = let script = s () in - let status = script#status in try match self#chooseFile () with | Some f -> @@ -1079,7 +1077,6 @@ let interactive_uri_choice (selection_mode :> Gtk.Tags.selection_mode); let model = new stringListModel dialog#uriChoiceTreeView in let choices = ref None in - let nonvars = ref false in (match copy_cb with | None -> () | Some cb -> @@ -1175,7 +1172,6 @@ let interactive_interp_choice () choices = assert (choices <> []); let dialog = gui#newRecordDialog () in let model = new interpModel dialog#recordChoiceTreeView choices in - let interp_len = List.length (List.hd choices) in dialog#recordChoiceDialog#set_title "Interpretation choice"; dialog#recordChoiceDialogLabel#set_label "Choose an interpretation:"; let interp_no = ref None in diff --git a/helm/matita/matitaScript.ml b/helm/matita/matitaScript.ml index 3fa4e93e7..08e3a4599 100644 --- a/helm/matita/matitaScript.ml +++ b/helm/matita/matitaScript.ml @@ -230,7 +230,6 @@ let eval_macro guistuff status user_goal unparsed_text parsed_text script mac = let module CTC = CicTypeChecker in let module CU = CicUniv in (* no idea why ocaml wants this *) - let advance ?statement () = script#advance ?statement () in let parsed_text_length = String.length parsed_text in let dbd = MatitaDb.instance () in match mac with @@ -347,7 +346,6 @@ let eval_executable guistuff status user_goal unparsed_text parsed_text script let module TAPp = GrafiteAstPp in let module MD = MatitaDisambiguator in let module ML = MatitacleanLib in - let parsed_text_length = String.length parsed_text in match ex with | TA.Command (loc, _) | TA.Tactical (loc, _, _) -> (try diff --git a/helm/matita/matitaSync.ml b/helm/matita/matitaSync.ml index 716aa04d2..74340421f 100644 --- a/helm/matita/matitaSync.ml +++ b/helm/matita/matitaSync.ml @@ -153,7 +153,6 @@ let save_object_to_disk status uri obj ugraph univlist = xmlunivgraphpath, univgraphuri = paths_and_uris_of_obj uri status in - let path_scheme_of path = "file://" ^ path in List.iter HExtlib.mkdir (List.map Filename.dirname [xmlpath]); (* now write to disk *) ensure_path_exists xmlpath; diff --git a/helm/matita/matitamakeLib.ml b/helm/matita/matitamakeLib.ml index 998dcd70e..a2640a42f 100644 --- a/helm/matita/matitamakeLib.ml +++ b/helm/matita/matitamakeLib.ml @@ -191,7 +191,6 @@ let vt100 s = let rex_d = Pcre.regexp "^Debug" in let rex_noendline = Pcre.regexp "\\n" in let s = Pcre.replace ~rex:rex_noendline s in - let len = String.length s in let tokens = Pcre.split ~rex s in let logger = ref MatitaLog.message in let rec aux = -- 2.39.2