From 2a8c9e10d266e78137606bb43f25468e16819711 Mon Sep 17 00:00:00 2001
From: Robbert Krebbers <mail@robbertkrebbers.nl>
Date: Fri, 6 May 2016 17:56:40 +0200
Subject: [PATCH] Rearrange arguments of exist_destruct_later to avoid type
 class loops.

---
 proofmode/coq_tactics.v | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/proofmode/coq_tactics.v b/proofmode/coq_tactics.v
index 77406583c..96bd90532 100644
--- a/proofmode/coq_tactics.v
+++ b/proofmode/coq_tactics.v
@@ -872,8 +872,8 @@ Global Instance exist_destruct_exist {A} (Φ : A → uPred M) :
   ExistDestruct (∃ a, Φ a) Φ.
 Proof. done. Qed.
 Global Instance exist_destruct_later {A} P (Φ : A → uPred M) :
-  Inhabited A → ExistDestruct P Φ → ExistDestruct (▷ P) (λ a, ▷ (Φ a))%I.
-Proof. rewrite /ExistDestruct=> ? ->. by rewrite later_exist. Qed.
+  ExistDestruct P Φ → Inhabited A → ExistDestruct (▷ P) (λ a, ▷ (Φ a))%I.
+Proof. rewrite /ExistDestruct=> HP ?. by rewrite HP later_exist. Qed.
 
 Lemma tac_exist_destruct {A} Δ i p j P (Φ : A → uPred M) Q :
   envs_lookup i Δ = Some (p, P)%I → ExistDestruct P Φ →
-- 
GitLab