]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/cic_notation/cicNotationUtil.ml
snapshot
[helm.git] / helm / ocaml / cic_notation / cicNotationUtil.ml
index e09ac345b779fc2c9daf39376667a12e4b8fc19a..630fb436168109ea56c3dff6302f74a80d78b64f 100644 (file)
@@ -161,7 +161,7 @@ let visit_layout k = function
   | Frac (t1, t2) -> Frac (k t1, k t2)
   | Sqrt t -> Sqrt (k t)
   | Root (arg, index) -> Root (k arg, k index)
-  | Break -> Break
+(*   | Break -> Break *)
   | Box (kind, terms) -> Box (kind, List.map k terms)
 
 let visit_magic k = function
@@ -309,5 +309,18 @@ let string_of_literal = function
 
 let boxify = function
   | [ a ] -> a
-  | l -> Layout (Box (H, l))
+  | 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