aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorGaëtan Gilbert2019-10-31 14:41:58 +0100
committerGaëtan Gilbert2019-10-31 14:41:58 +0100
commit49f0201e5570480116a107765a867e99ef9a8bc6 (patch)
tree9f905a0a11faba5aba1cb463a1e543f4849d95d5 /doc
parentce837d592b14095770b5c4a2a8c8040b20893718 (diff)
parent6da3091bdb249af11302042e7958f87b2cd36e63 (diff)
Merge PR #10861: Fix #10615: Notation substitution for Ltac2 terms.
Reviewed-by: SkySkimmer Ack-by: jfehrle
Diffstat (limited to 'doc')
-rw-r--r--doc/sphinx/proof-engine/ltac2.rst14
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/sphinx/proof-engine/ltac2.rst b/doc/sphinx/proof-engine/ltac2.rst
index 18d2c79461..cfdc70d50e 100644
--- a/doc/sphinx/proof-engine/ltac2.rst
+++ b/doc/sphinx/proof-engine/ltac2.rst
@@ -563,6 +563,20 @@ for it.
- `&x` as a Coq constr expression expands to
`ltac2:(Control.refine (fun () => hyp @x))`.
+In the special case where Ltac2 antiquotations appear inside a Coq term
+notation, the notation variables are systematically bound in the body
+of the tactic expression with type `Ltac2.Init.preterm`. Such a type represents
+untyped syntactic Coq expressions, which can by typed in the
+current context using the `Ltac2.Constr.pretype` function.
+
+.. example::
+
+ The following notation is essentially the identity.
+
+ .. coqtop:: in
+
+ Notation "[ x ]" := ltac2:(let x := Ltac2.Constr.pretype x in exact $x) (only parsing).
+
Dynamic semantics
*****************