From 05f30d597443a6709d8df916e962f977a553c8ca Mon Sep 17 00:00:00 2001 From: Jason Gross Date: Sat, 17 Sep 2016 18:43:54 -0400 Subject: Add reserved notation for Let, change # We reserve [a # b] in Notations.v, and make it's level compatible with the notation declared in the std lib for Q. --- src/Util/LetIn.v | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/Util/LetIn.v') diff --git a/src/Util/LetIn.v b/src/Util/LetIn.v index 479d3a454..a15204c96 100644 --- a/src/Util/LetIn.v +++ b/src/Util/LetIn.v @@ -1,10 +1,9 @@ Require Import Coq.Classes.Morphisms Coq.Relations.Relation_Definitions. Require Import Crypto.Util.Tactics. +Require Import Crypto.Util.Notations. Definition Let_In {A P} (x : A) (f : forall a : A, P a) : P x := let y := x in f y. -Notation "'Let' x := y 'in' f" := (Let_In y (fun x => f)) - (format "'[' 'Let' x := y 'in' ']' '/' '[' f ']'", - at level 200, f at level 200). +Notation "'Let' x := y 'in' f" := (Let_In y (fun x => f)). 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)). @@ -22,7 +21,7 @@ Proof. intros. cbv [Let_In]. reflexivity. Qed. Class _call_let_in_to_Let_In {T} (e:T) := _let_in_to_Let_In_return : T. (* : forall T, gallina T -> gallina T, structurally recursive in the argument *) -Ltac let_in_to_Let_In e := +Ltac let_in_to_Let_In e := lazymatch e with | let x := ?ex in @?eC x => let ex := let_in_to_Let_In ex in @@ -44,4 +43,4 @@ Hint Extern 0 (_call_let_in_to_Let_In ?e) => ( Ltac change_let_in_with_Let_In := let g := get_goal in let g' := let_in_to_Let_In g in - change g'. \ No newline at end of file + change g'. -- cgit v1.2.3