]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/cic_notation/cicNotationUtil.ml
snapshot
[helm.git] / helm / ocaml / cic_notation / cicNotationUtil.ml
index 964c303ee91dbc27d646c191197a71b7193bfe77..630fb436168109ea56c3dff6302f74a80d78b64f 100644 (file)
@@ -311,3 +311,16 @@ let boxify = function
   | [ a ] -> a
   | l -> Layout (Box ((H, false, false), l))
 
+let find_appl_pattern_uris ap =
+  let rec aux acc =
+    function
+    | UriPattern uri ->
+        (try
+          ignore (List.find (fun uri' -> UriManager.eq uri uri') acc);
+          acc
+        with Not_found -> uri :: acc)
+    | VarPattern _ -> acc
+    | ApplPattern apl -> List.fold_left aux acc apl
+  in
+  aux [] ap
+