aboutsummaryrefslogtreecommitdiff
path: root/src/Util/LetIn.v
diff options
context:
space:
mode:
authorGravatar Jason Gross <jgross@mit.edu>2016-09-17 18:43:54 -0400
committerGravatar Jason Gross <jgross@mit.edu>2016-09-17 18:54:45 -0400
commit05f30d597443a6709d8df916e962f977a553c8ca (patch)
tree19b2b2aacb9dc3cb3ddd6c1b147a730890966025 /src/Util/LetIn.v
parent1bacc083da890d7289f1ee54a41996db7a787a92 (diff)
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.
Diffstat (limited to 'src/Util/LetIn.v')
-rw-r--r--src/Util/LetIn.v9
1 files changed, 4 insertions, 5 deletions
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'.