aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorEmilio Jesus Gallego Arias2020-02-20 13:56:23 -0500
committerEmilio Jesus Gallego Arias2020-02-20 13:56:23 -0500
commitf748ca04748ef00b85de7f31dc1dc7f0a985ec3f (patch)
tree60a101df6b546e33878a9ac0900d1009f666c7be /doc
parent935101ee1375ed930e993d0e76f2325ade562506 (diff)
parenta8307ceecc4347593e67cff2044a250b75060f5a (diff)
Merge PR #10832: Addressing #6082 and #7766: warning when overriding notation format + new notion of format associated to a given interpretation
Ack-by: maximedenes
Diffstat (limited to 'doc')
-rw-r--r--doc/changelog/03-notations/10832-master+fix6082-7766-overriding-notation-format.rst1
-rw-r--r--doc/sphinx/user-extensions/syntax-extensions.rst9
2 files changed, 10 insertions, 0 deletions
diff --git a/doc/changelog/03-notations/10832-master+fix6082-7766-overriding-notation-format.rst b/doc/changelog/03-notations/10832-master+fix6082-7766-overriding-notation-format.rst
new file mode 100644
index 0000000000..5393fb3d8c
--- /dev/null
+++ b/doc/changelog/03-notations/10832-master+fix6082-7766-overriding-notation-format.rst
@@ -0,0 +1 @@
+- Different interpretations in different scopes of the same notation string can now be associated to different printing formats; this fixes bug #6092 and #7766 (`#10832 <https://github.com/coq/coq/pull/10832>`_, by Hugo Herbelin).
diff --git a/doc/sphinx/user-extensions/syntax-extensions.rst b/doc/sphinx/user-extensions/syntax-extensions.rst
index a8d5ac610f..7c628e534b 100644
--- a/doc/sphinx/user-extensions/syntax-extensions.rst
+++ b/doc/sphinx/user-extensions/syntax-extensions.rst
@@ -163,6 +163,10 @@ Grammar constr` is at level 100. To avoid ``x : A`` being parsed as a type cast,
it is necessary to put ``x`` at a level below 100, typically 99. Hence, a correct
definition is the following:
+.. coqtop:: none
+
+ Reset Initial.
+
.. coqtop:: all
Notation "{ x : A | P }" := (sig A (fun x => P)) (x at level 99).
@@ -350,6 +354,11 @@ Reserving notations
This command declares an infix parsing rule without giving its
interpretation.
+ When a format is attached to a reserved notation, it is used by
+ default by all subsequent interpretations of the corresponding
+ notation. A specific interpretation can provide its own format
+ overriding the default format though.
+
Simultaneous definition of terms and notations
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~