diff options
-rw-r--r-- | engine/eConstr.ml | 7 | ||||
-rw-r--r-- | engine/eConstr.mli | 13 |
2 files changed, 18 insertions, 2 deletions
diff --git a/engine/eConstr.ml b/engine/eConstr.ml index 46ac13b69..e5ac3792d 100644 --- a/engine/eConstr.ml +++ b/engine/eConstr.ml @@ -668,6 +668,9 @@ module Vars = struct exception LocalOccur let to_constr = unsafe_to_constr +let to_rel_decl = unsafe_to_rel_decl + +type substl = t list (** Operations that commute with evar-normalization *) let lift n c = of_constr (Vars.lift n (to_constr c)) @@ -677,6 +680,10 @@ let substnl subst n c = of_constr (Vars.substnl (cast_list unsafe_eq subst) n (t let substl subst c = of_constr (Vars.substl (cast_list unsafe_eq subst) (to_constr c)) let subst1 c r = of_constr (Vars.subst1 (to_constr c) (to_constr r)) +let substnl_decl subst n d = of_rel_decl (Vars.substnl_decl (cast_list unsafe_eq subst) n (to_rel_decl d)) +let substl_decl subst d = of_rel_decl (Vars.substl_decl (cast_list unsafe_eq subst) (to_rel_decl d)) +let subst1_decl c d = of_rel_decl (Vars.subst1_decl (to_constr c) (to_rel_decl d)) + let replace_vars subst c = of_constr (Vars.replace_vars (cast_list_snd unsafe_eq subst) (to_constr c)) let substn_vars n subst c = of_constr (Vars.substn_vars n subst (to_constr c)) diff --git a/engine/eConstr.mli b/engine/eConstr.mli index 693b592fd..9d705b4d5 100644 --- a/engine/eConstr.mli +++ b/engine/eConstr.mli @@ -205,12 +205,21 @@ val fold : Evd.evar_map -> ('a -> t -> 'a) -> 'a -> t -> 'a module Vars : sig + +(** See vars.mli for the documentation of the functions below *) + +type substl = t list + val lift : int -> t -> t val liftn : int -> int -> t -> t -val substnl : t list -> int -> t -> t -val substl : t list -> t -> t +val substnl : substl -> int -> t -> t +val substl : substl -> t -> t val subst1 : t -> t -> t +val substnl_decl : substl -> int -> rel_declaration -> rel_declaration +val substl_decl : substl -> rel_declaration -> rel_declaration +val subst1_decl : t -> rel_declaration -> rel_declaration + val replace_vars : (Id.t * t) list -> t -> t val substn_vars : int -> Id.t list -> t -> t val subst_vars : Id.t list -> t -> t |