aboutsummaryrefslogtreecommitdiff
path: root/test-suite
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2019-06-08 15:20:41 +0200
committerPierre-Marie Pédrot2019-06-08 15:20:41 +0200
commit65f75de6929530252a3235af54a0da56980fa02d (patch)
treeb61d06dc1a3b78f6390fb929bb0fa73eb73e2a2d /test-suite
parent0d97f184408ffd50d11608f0e73ac3edaf1193ca (diff)
parentfe49db8833803f87e2f750b698f28868d276bfe6 (diff)
Merge PR #10289: [Ltac2] “constr” arguments to tactic notations may have interpretation scopes
Reviewed-by: Zimmi48 Reviewed-by: ppedrot Ack-by: vbgl
Diffstat (limited to 'test-suite')
-rw-r--r--test-suite/ltac2/notations.v24
1 files changed, 24 insertions, 0 deletions
diff --git a/test-suite/ltac2/notations.v b/test-suite/ltac2/notations.v
new file mode 100644
index 0000000000..3d2a875e38
--- /dev/null
+++ b/test-suite/ltac2/notations.v
@@ -0,0 +1,24 @@
+From Ltac2 Require Import Ltac2.
+From Coq Require Import ZArith String List.
+
+Open Scope Z_scope.
+
+Check 1 + 1 : Z.
+
+Ltac2 Notation "ex" arg(constr(nat,Z)) := arg.
+
+Check (1 + 1)%nat%Z = 1%nat.
+
+Lemma two : nat.
+ refine (ex (1 + 1)).
+Qed.
+
+Import ListNotations.
+Close Scope list_scope.
+
+Ltac2 Notation "sl" arg(constr(string,list)) := arg.
+
+Lemma maybe : list bool.
+Proof.
+ refine (sl ["left" =? "right"]).
+Qed.