aboutsummaryrefslogtreecommitdiffhomepage
path: root/test-suite/success/Notations.v
diff options
context:
space:
mode:
authorGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2017-02-23 14:34:44 +0100
committerGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2017-02-23 14:52:35 +0100
commitfedc831df9626a31cd0d26ee6b9e022b67f90c2a (patch)
treea2b66571ca95f3460b6818f2f0716e68bfeee133 /test-suite/success/Notations.v
parent4ddf3ee41eb6e8faaf223041d2bd42d4c62be58d (diff)
Fixing a little bug in using the "where" clause for inductive types.
This was not working when the inductive type had implicit parameters. This could still be improved. E.g. the following still does not work: Reserved Notation "#". Inductive I {A:Type} := C : # where "#" := I. But it should be made working by taking care of adding the mandatory implicit argument A at the time # is interpreted as [@I _] (i.e., technically speaking, using expl_impls in interp_notation).
Diffstat (limited to 'test-suite/success/Notations.v')
-rw-r--r--test-suite/success/Notations.v6
1 files changed, 6 insertions, 0 deletions
diff --git a/test-suite/success/Notations.v b/test-suite/success/Notations.v
index 511b60b4b..8c83b196e 100644
--- a/test-suite/success/Notations.v
+++ b/test-suite/success/Notations.v
@@ -116,3 +116,9 @@ Notation " |- {{ a }} b" := (a=b) (no associativity, at level 10).
Goal True.
{{ exact I. }}
Qed.
+
+(* Check "where" clause for inductive types with parameters *)
+
+Reserved Notation "x === y" (at level 50).
+Inductive EQ {A} (x:A) : A -> Prop := REFL : x === x
+ where "x === y" := (EQ x y).