diff options
author | Jason Gross <jgross@mit.edu> | 2016-10-03 16:20:41 -0400 |
---|---|---|
committer | Jason Gross <jgross@mit.edu> | 2016-10-03 16:20:41 -0400 |
commit | 092b80668ed9b56b54906f362ae6fae8155e94b0 (patch) | |
tree | de7c7b000377a7dabc5e185be4e5abe036ec7266 | |
parent | a60260aed203fd5886037d9c3ac8490b83d6bb21 (diff) |
Work around bug 5107 (broken return inference)
This is https://coq.inria.fr/bugs/show_bug.cgi?id=5107, Unification got
weaker in the past week or so. We work around this by making [dlet]
non-dependent.
-rw-r--r-- | src/BoundedArithmetic/DoubleBounded.v | 1 | ||||
-rw-r--r-- | src/BoundedArithmetic/DoubleBoundedProofs.v | 1 | ||||
-rw-r--r-- | src/Util/LetIn.v | 4 |
3 files changed, 6 insertions, 0 deletions
diff --git a/src/BoundedArithmetic/DoubleBounded.v b/src/BoundedArithmetic/DoubleBounded.v index 5cf48cd3b..09a1926f2 100644 --- a/src/BoundedArithmetic/DoubleBounded.v +++ b/src/BoundedArithmetic/DoubleBounded.v @@ -7,6 +7,7 @@ Require Import Crypto.Util.Tuple. Require Import Crypto.Util.ListUtil. Require Import Crypto.Util.Notations. Require Import Crypto.Util.LetIn. +Import Bug5107WorkAround. Local Open Scope nat_scope. Local Open Scope Z_scope. diff --git a/src/BoundedArithmetic/DoubleBoundedProofs.v b/src/BoundedArithmetic/DoubleBoundedProofs.v index 07727ea0d..ef6e3c5c0 100644 --- a/src/BoundedArithmetic/DoubleBoundedProofs.v +++ b/src/BoundedArithmetic/DoubleBoundedProofs.v @@ -13,6 +13,7 @@ Require Import Crypto.Util.ListUtil. Require Import Crypto.Util.Tactics. Require Import Crypto.Util.Notations. Require Import Crypto.Util.LetIn. +Import Bug5107WorkAround. Import ListNotations. Local Open Scope list_scope. diff --git a/src/Util/LetIn.v b/src/Util/LetIn.v index 366ae5dff..db09baf9c 100644 --- a/src/Util/LetIn.v +++ b/src/Util/LetIn.v @@ -8,6 +8,10 @@ Definition Let_In_pf {A P} (x : A) (f : forall a : A, a = x -> P a) : P x := let Notation "'dlet' x := y 'in' f" := (Let_In y (fun x => f)). Notation "'pflet' x , pf := y 'in' f" := (Let_In_pf y (fun x pf => f)). +Module Bug5107WorkAround. + Notation "'dlet' x := y 'in' f" := (Let_In (P:=fun _ => _) y (fun x => f)). +End Bug5107WorkAround. + Global Instance Proper_Let_In_nd_changebody {A P R} {Reflexive_R:@Reflexive P R} : Proper (eq ==> pointwise_relation _ R ==> R) (@Let_In A (fun _ => P)). Proof. lazy; intros; subst; auto; congruence. Qed. |