X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fcic_notation%2FcicNotationFwd.ml;h=10bab9e36fb3bcaedd333aec34ec64610077164d;hb=31afc64440b7da53bb79e6f1524d47bf0fb56aaf;hp=b200de2efdfc6de6429523c4f3aa83e6ee1d8443;hpb=724827ba7e5c1419229382487bed53f7dbb862db;p=helm.git diff --git a/helm/ocaml/cic_notation/cicNotationFwd.ml b/helm/ocaml/cic_notation/cicNotationFwd.ml index b200de2ef..10bab9e36 100644 --- a/helm/ocaml/cic_notation/cicNotationFwd.ml +++ b/helm/ocaml/cic_notation/cicNotationFwd.ml @@ -26,7 +26,9 @@ open CicNotationEnv open CicNotationPt -let meta_names_of term = +(* XXX ZACK: switched to CicNotationUtil.names_of_term, commented code below to + * be removes as soon as we believe implementation are equivalent *) +(* let meta_names_of term = let rec names = ref [] in let add_name n = if List.mem n !names then () @@ -90,7 +92,7 @@ let meta_names_of term = | _ -> assert false in aux term ; - !names + !names *) let unopt_names names env = let rec aux acc = function @@ -188,7 +190,7 @@ let instantiate_level2 env term = | Ascription (term, name) -> assert false and aux_magic env = function | Default (some_pattern, none_pattern) -> - (match meta_names_of some_pattern with + (match CicNotationUtil.names_of_term some_pattern with | [] -> assert false (* some pattern must contain at least 1 name *) | (name :: _) as names -> (match lookup_value env name with @@ -202,7 +204,8 @@ let instantiate_level2 env term = | Fold (`Left, base_pattern, names, rec_pattern) -> let acc_name = List.hd names in (* names can't be empty, cfr. parser *) let meta_names = - List.filter ((<>) acc_name) (meta_names_of rec_pattern) + List.filter ((<>) acc_name) + (CicNotationUtil.names_of_term rec_pattern) in (match meta_names with | [] -> assert false (* as above *) @@ -222,7 +225,8 @@ let instantiate_level2 env term = | Fold (`Right, base_pattern, names, rec_pattern) -> let acc_name = List.hd names in (* names can't be empty, cfr. parser *) let meta_names = - List.filter ((<>) acc_name) (meta_names_of rec_pattern) + List.filter ((<>) acc_name) + (CicNotationUtil.names_of_term rec_pattern) in (match meta_names with | [] -> assert false (* as above *)