]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/matita/matitaGui.ml
New functions UriManager.uri_is_var, UriManager.uri_is_con.
[helm.git] / helm / matita / matitaGui.ml
index 8915f7681270ad43bdb94a009047820ac657f10d..34cf20afa4eb42bb0232ee13cd680e9faf024137 100644 (file)
@@ -401,12 +401,6 @@ let instance = singleton gui
 
 let non p x = not (p x)
 
-let is_var_uri s =
-  let s = UriManager.string_of_uri s in
-  try
-    String.sub s (String.length s - 4) 4 = ".var"
-  with Invalid_argument _ -> false
-
 (* this is a shit and should be changed :-{ *)
 let interactive_uri_choice
   ?(selection_mode:[`SINGLE|`MULTIPLE] = `MULTIPLE) ?(title = "")
@@ -416,7 +410,7 @@ let interactive_uri_choice
   ~id uris
 =
   let gui = instance () in
-  let nonvars_uris = lazy (List.filter (non is_var_uri) uris) in
+  let nonvars_uris = lazy (List.filter (non UriManager.uri_is_var) uris) in
   if (selection_mode <> `SINGLE) &&
     (Helm_registry.get_bool "matita.auto_disambiguation")
   then