From 9c43011e7b5f10f6532aa5a9b22bfccfa249de42 Mon Sep 17 00:00:00 2001
From: Robbert Krebbers <mail@robbertkrebbers.nl>
Date: Tue, 13 Aug 2019 09:26:54 +0200
Subject: [PATCH] Improve error message of `iRevert` in case of used variable.

---
 theories/proofmode/ltac_tactics.v | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/theories/proofmode/ltac_tactics.v b/theories/proofmode/ltac_tactics.v
index 131541b51..05fd8521a 100644
--- a/theories/proofmode/ltac_tactics.v
+++ b/theories/proofmode/ltac_tactics.v
@@ -570,7 +570,8 @@ Local Tactic Notation "iForallRevert" ident(x) :=
     intros x;
     iMatchHyp (fun H P =>
       lazymatch P with
-      | context [x] => fail 2 "iRevert:" x "is used in hypothesis" H
+      | context [x] =>
+         let H := pretty_ident H in fail 2 "iRevert:" x "is used in hypothesis" H
       end) in
   iStartProof;
   first [let _ := type of x in idtac|fail 1 "iRevert:" x "not in scope"];
-- 
GitLab