aboutsummaryrefslogtreecommitdiff
path: root/plugins/ltac/tacintern.ml
diff options
context:
space:
mode:
authorMaxime Dénès2017-11-13 11:11:44 +0100
committerMaxime Dénès2017-11-13 11:11:44 +0100
commit1f9dcdee40d95ee56ef91876579f2c059939e04a (patch)
treea018b8cddb19e2f909238e74311f59f1ab284003 /plugins/ltac/tacintern.ml
parentd9f79d97dbc503e149cba2df1b228a94d7ac970b (diff)
parent8c6092e8c43a74a8a175a532580284124c06e34f (diff)
Merge PR #6000: Adding support for syntax "let _ := e in e'" in Ltac.
Diffstat (limited to 'plugins/ltac/tacintern.ml')
-rw-r--r--plugins/ltac/tacintern.ml7
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/ltac/tacintern.ml b/plugins/ltac/tacintern.ml
index f171fd07d7..b16b0a7bae 100644
--- a/plugins/ltac/tacintern.ml
+++ b/plugins/ltac/tacintern.ml
@@ -468,9 +468,10 @@ let rec intern_match_goal_hyps ist ?(as_type=false) lfun = function
(* Utilities *)
let extract_let_names lrc =
let fold accu ((loc, name), _) =
- if Id.Set.mem name accu then user_err ?loc
+ Nameops.Name.fold_right (fun id accu ->
+ if Id.Set.mem id accu then user_err ?loc
~hdr:"glob_tactic" (str "This variable is bound several times.")
- else Id.Set.add name accu
+ else Id.Set.add id accu) name accu
in
List.fold_left fold Id.Set.empty lrc
@@ -812,7 +813,7 @@ let notation_subst bindings tac =
let fold id c accu =
let loc = Glob_ops.loc_of_glob_constr (fst c) in
let c = ConstrMayEval (ConstrTerm c) in
- ((loc, id), c) :: accu
+ ((loc, Name id), c) :: accu
in
let bindings = Id.Map.fold fold bindings [] in
(** This is theoretically not correct due to potential variable capture, but