X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matitaB%2Fcomponents%2Fcontent%2FnotationUtil.ml;h=eeb1cd5c6f6992b80b32004f52ed09e3e19bd96c;hb=2914bfbeac3c2e0f53ba8c612cd11b3b2afbabce;hp=3d80e8fd51427a0d091335a95e186b1b4553d91f;hpb=cacbe3c6493ddce76c4c13379ade271d8dd172e8;p=helm.git diff --git a/matitaB/components/content/notationUtil.ml b/matitaB/components/content/notationUtil.ml index 3d80e8fd5..eeb1cd5c6 100644 --- a/matitaB/components/content/notationUtil.ml +++ b/matitaB/components/content/notationUtil.ml @@ -52,9 +52,6 @@ let visit_ast ?(special_k = fun _ -> assert false) definitions in Ast.LetRec (kind, definitions, k term) - | Ast.Ident (name, Some substs) -> - Ast.Ident (name, Some (aux_substs substs)) - | Ast.Uri (name, Some substs) -> Ast.Uri (name, Some (aux_substs substs)) | Ast.Meta (index, substs) -> Ast.Meta (index, List.map aux_opt substs) | (Ast.AttributedTerm _ | Ast.Layout _ @@ -68,7 +65,6 @@ let visit_ast ?(special_k = fun _ -> assert false) | Ast.Num _ | Ast.Sort _ | Ast.Symbol _ - | Ast.Uri _ | Ast.UserInput) as t -> t and aux_opt = function | None -> None @@ -80,8 +76,6 @@ let visit_ast ?(special_k = fun _ -> assert false) Ast.Pattern (head, hrefs, vars), term -> Ast.Pattern (head, k_xref hrefs, List.map aux_capture_variable vars), k term | Ast.Wildcard, term -> Ast.Wildcard, k term - and aux_subst (name, term) = (name, k term) - and aux_substs substs = List.map aux_subst substs in aux @@ -205,8 +199,6 @@ let meta_names_of_term term = | Ast.LetRec (_, definitions, body) -> List.iter aux_definition definitions ; aux body - | Ast.Uri (_, Some substs) -> aux_substs substs - | Ast.Ident (_, Some substs) -> aux_substs substs | Ast.Meta (_, substs) -> aux_meta_substs substs | Ast.Implicit _ @@ -214,7 +206,6 @@ let meta_names_of_term term = | Ast.Num _ | Ast.Sort _ | Ast.Symbol _ - | Ast.Uri _ | Ast.UserInput -> () | Ast.Magic magic -> aux_magic magic @@ -236,7 +227,6 @@ let meta_names_of_term term = List.iter aux_capture_var params ; aux_capture_var var ; aux term - and aux_substs substs = List.iter (fun (_, term) -> aux term) substs and aux_meta_substs meta_substs = List.iter aux_opt meta_substs and aux_variable = function | Ast.NumVar name -> add_name name @@ -354,6 +344,9 @@ let fresh_id () = (* FG: "η" is not an identifier (it is rendered, but not be parsed) *) let fresh_name () = "eta" ^ string_of_int (fresh_id ()) +(* XXX FIXME: was used to add instance indices to symbols/numbers + * do we even need a similar operation? + * currently an identity function! *) let rec freshen_term ?(index = ref 0) term = let freshen_term = freshen_term ~index in let fresh_instance () = incr index; !index in @@ -366,8 +359,8 @@ let rec freshen_term ?(index = ref 0) term = | _ -> assert false in match term with - | Ast.Symbol (s, instance) -> Ast.Symbol (s, fresh_instance ()) - | Ast.Num (s, instance) -> Ast.Num (s, fresh_instance ()) + | Ast.Symbol (s, x) -> Ast.Symbol (s, x (* fresh_instance () *)) + | Ast.Num (s, x) -> Ast.Num (s, x (* fresh_instance () *)) | t -> visit_ast ~special_k freshen_term t let freshen_obj obj =