X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=matita%2Fcomponents%2Fcontent%2FnotationUtil.ml;h=3683c0c0e80383996751eb6c6858c31f552cd179;hb=b3f8b89278d193ed0aa0f39e7f8d74cf1de81d8d;hp=98e1ba663b9adaac3868f9e4ac8879e3cb5054f0;hpb=f6b7c6ae353e014761a3d24dbc87e00d828d7f2d;p=helm.git diff --git a/matita/components/content/notationUtil.ml b/matita/components/content/notationUtil.ml index 98e1ba663..3683c0c0e 100644 --- a/matita/components/content/notationUtil.ml +++ b/matita/components/content/notationUtil.ml @@ -386,14 +386,30 @@ let freshen_obj obj = indtypes in NotationPt.Inductive (freshen_capture_variables params, indtypes) - | NotationPt.Theorem (flav, n, t, ty_opt,p) -> + | NotationPt.Theorem (n, t, ty_opt, attrs) -> let ty_opt = match ty_opt with None -> None | Some ty -> Some (freshen_term ty) in - NotationPt.Theorem (flav, n, freshen_term t, ty_opt,p) + NotationPt.Theorem (n, freshen_term t, ty_opt, attrs) | NotationPt.Record (params, n, ty, fields) -> NotationPt.Record (freshen_capture_variables params, n, freshen_term ty, freshen_name_ty_b fields) let freshen_term = freshen_term ?index:None +let rec refresh_uri_in_term ~refresh_uri_in_term:refresh_in_cic + ~refresh_uri_in_reference += + function + NotationPt.NRef ref -> NotationPt.NRef (refresh_uri_in_reference ref) + | NotationPt.NCic t -> NotationPt.NCic (refresh_in_cic t) + | t -> + visit_ast + (refresh_uri_in_term ~refresh_uri_in_term:refresh_in_cic + ~refresh_uri_in_reference) t + ~special_k:(fun x -> x) + ~map_xref_option:(function Some ref -> Some (refresh_uri_in_reference ref) + | x -> x) + ~map_case_indty:(function (Some (s,Some ref)) -> Some (s, Some + (refresh_uri_in_reference ref)) | x -> x) +;;