aboutsummaryrefslogtreecommitdiff
path: root/pretyping
diff options
context:
space:
mode:
authorHugo Herbelin2018-04-13 17:20:31 +0200
committerHugo Herbelin2018-09-10 10:27:50 +0200
commita25a28e167aabca816a6af37c69a1a72a6be9388 (patch)
tree658c83c7d85e3bb23feea666726108f5dccd5a90 /pretyping
parent69fb545f0fad2b356f5be1ce3e1a24b5afe26ce2 (diff)
Files pretyping.ml, glob_obs.ml, evarutil.ml: rewording/typos in some comments.
Diffstat (limited to 'pretyping')
-rw-r--r--pretyping/glob_ops.mli4
-rw-r--r--pretyping/pretyping.ml7
2 files changed, 8 insertions, 3 deletions
diff --git a/pretyping/glob_ops.mli b/pretyping/glob_ops.mli
index c967f4e884..7bc0140931 100644
--- a/pretyping/glob_ops.mli
+++ b/pretyping/glob_ops.mli
@@ -101,5 +101,9 @@ val glob_constr_of_cases_pattern : 'a cases_pattern_g -> 'a glob_constr_g
val add_patterns_for_params_remove_local_defs : constructor -> 'a cases_pattern_g list -> 'a cases_pattern_g list
+(* [ltac_interp_name subst na] interprets a name according to a name
+ substitution (subst.ltac_idents) and a list of names
+ (subst.ltac_genargs) on which to fail; returns [na] otherwise *)
val ltac_interp_name : Ltac_pretype.ltac_var_map -> Name.t -> Name.t
+
val empty_lvar : Ltac_pretype.ltac_var_map
diff --git a/pretyping/pretyping.ml b/pretyping/pretyping.ml
index a315376aca..42491f4e40 100644
--- a/pretyping/pretyping.ml
+++ b/pretyping/pretyping.ml
@@ -417,12 +417,13 @@ let orelse_name name name' = match name with
| Anonymous -> name'
| _ -> name
+(* Rename identifiers of the (initial part of) typing "rel" env *)
+(* according to a name substitution *)
let ltac_interp_name_env k0 lvar env sigma =
- (* envhd is the initial part of the env when pretype was called first *)
- (* (in practice is is probably 0, but we have to grant the
+ (* ctxt is the initial part of the env when pretype was called first *)
+ (* (in practice k0 is probably 0, but we have to grant the
specification of pretype which accepts to start with a non empty
rel_context) *)
- (* tail is the part of the env enriched by pretyping *)
let n = Context.Rel.length (rel_context env) - k0 in
let ctxt,_ = List.chop n (rel_context env) in
let open Context.Rel.Declaration in