]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/cic_notation/cicNotationMatcher.ml
packaging cleanup: get rid of ancient debhelpers, use dh_install
[helm.git] / helm / ocaml / cic_notation / cicNotationMatcher.ml
index 2ae4fd00e1664976c1fa7fa0e954cc624a79b330..b9809335cf491d493c683dd81f69fe842398ac42 100644 (file)
@@ -195,7 +195,8 @@ struct
   struct
     type pattern_t = Pt.term
     type term_t = Pt.term
-    let classify = function
+    let rec classify = function
+      | Pt.AttributedTerm (_, t) -> classify t
       | Pt.Variable _ -> Variable
       | Pt.Magic _
       | Pt.Layout _
@@ -373,20 +374,23 @@ struct
       Hashtbl.hash mask, tl
 
     let mask_of_appl_pattern = function
-      | GrafiteAst.UriPattern uri -> Uri uri, []
-      | GrafiteAst.VarPattern _ -> Blob, []
-      | GrafiteAst.ApplPattern pl -> Appl (List.map (fun _ -> Blob) pl), pl
+      | Pt.UriPattern uri -> Uri uri, []
+      | Pt.ImplicitPattern
+      | Pt.VarPattern _ -> Blob, []
+      | Pt.ApplPattern pl -> Appl (List.map (fun _ -> Blob) pl), pl
 
     let tag_of_pattern p =
       let mask, pl = mask_of_appl_pattern p in
       Hashtbl.hash mask, pl
 
-    type pattern_t = GrafiteAst.cic_appl_pattern
+    type pattern_t = Pt.cic_appl_pattern
     type term_t = Cic.annterm
 
     let classify = function
-      | GrafiteAst.VarPattern _ -> Variable
-      | _ -> Constructor
+      | Pt.ImplicitPattern
+      | Pt.VarPattern _ -> Variable
+      | Pt.UriPattern _
+      | Pt.ApplPattern _ -> Constructor
   end
 
   module M = Matcher (Pattern32)
@@ -399,7 +403,8 @@ struct
           List.map2
             (fun p t ->
               match p with
-              | GrafiteAst.VarPattern name -> name, t
+              | Pt.ImplicitPattern -> Util.fresh_name (), t
+              | Pt.VarPattern name -> name, t
               | _ -> assert false)
             pl matched_terms
         in