aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/changelog/02-specification-language/11261-master+implicit-type-used-printing.rst5
-rw-r--r--doc/changelog/03-notations/11120-master+refactoring-application-printing.rst17
-rw-r--r--doc/changelog/03-notations/11590-master+fix9741-only-printing-does-not-reserve-keyword.rst4
-rwxr-xr-xdoc/sphinx/conf.py2
-rw-r--r--doc/sphinx/language/gallina-extensions.rst7
-rw-r--r--doc/sphinx/user-extensions/syntax-extensions.rst27
6 files changed, 61 insertions, 1 deletions
diff --git a/doc/changelog/02-specification-language/11261-master+implicit-type-used-printing.rst b/doc/changelog/02-specification-language/11261-master+implicit-type-used-printing.rst
new file mode 100644
index 0000000000..51818c666b
--- /dev/null
+++ b/doc/changelog/02-specification-language/11261-master+implicit-type-used-printing.rst
@@ -0,0 +1,5 @@
+- **Added:**
+ :cmd:`Implicit Types` are now taken into account for printing. To inhibit it,
+ unset the :flag:`Printing Use Implicit Types` flag
+ (`#11261 <https://github.com/coq/coq/pull/11261>`_,
+ by Hugo Herbelin, granting `#10366 <https://github.com/coq/coq/pull/10366>`_).
diff --git a/doc/changelog/03-notations/11120-master+refactoring-application-printing.rst b/doc/changelog/03-notations/11120-master+refactoring-application-printing.rst
new file mode 100644
index 0000000000..d95f554766
--- /dev/null
+++ b/doc/changelog/03-notations/11120-master+refactoring-application-printing.rst
@@ -0,0 +1,17 @@
+- **Fixed:** Parsing and printing consistently handle inheritance of implicit
+ arguments in notations. With the exception of notations of
+ the form :n:`Notation @string := @@qualid` and :n:`Notation @ident := @@qualid` which
+ inhibit implicit arguments, all notations binding a partially
+ applied constant, as e.g. in :n:`Notation @string := (@qualid {+ @arg })`,
+ or :n:`Notation @string := (@@qualid {+ @arg })`, or
+ :n:`Notation @ident := (@qualid {+ @arg })`, or :n:`Notation @ident
+ := (@@qualid {+ @arg })`, inherit the remaining implicit arguments
+ (`#11120 <https://github.com/coq/coq/pull/11120>`_, by Hugo
+ Herbelin, fixing `#4690 <https://github.com/coq/coq/pull/4690>`_ and
+ `#11091 <https://github.com/coq/coq/pull/11091>`_).
+
+- **Changed:** Interpretation scopes are now always inherited in
+ notations binding a partially applied constant, including for
+ notations binding an expression of the form :n:`@@qualid`. The latter was
+ not the case beforehand
+ (part of `#11120 <https://github.com/coq/coq/pull/11120>`_).
diff --git a/doc/changelog/03-notations/11590-master+fix9741-only-printing-does-not-reserve-keyword.rst b/doc/changelog/03-notations/11590-master+fix9741-only-printing-does-not-reserve-keyword.rst
new file mode 100644
index 0000000000..1d94cbf21b
--- /dev/null
+++ b/doc/changelog/03-notations/11590-master+fix9741-only-printing-does-not-reserve-keyword.rst
@@ -0,0 +1,4 @@
+- **Fixed:**
+ Notations in onlyprinting mode do not uselessly reserve parsing keywords
+ (`#11590 <https://github.com/coq/coq/pull/11590>`_,
+ by Hugo Herbelin, fixes `#9741 <https://github.com/coq/coq/pull/9741>`_).
diff --git a/doc/sphinx/conf.py b/doc/sphinx/conf.py
index f1dd7479c5..77cb3ecc21 100755
--- a/doc/sphinx/conf.py
+++ b/doc/sphinx/conf.py
@@ -108,7 +108,7 @@ master_doc = "index"
# General information about the project.
project = 'Coq'
-copyright = '1999-2019, Inria, CNRS and contributors'
+copyright = '1999-2020, Inria, CNRS and contributors'
author = 'The Coq Development Team'
# The version info for the project you're documenting, acts as replacement for
diff --git a/doc/sphinx/language/gallina-extensions.rst b/doc/sphinx/language/gallina-extensions.rst
index f0bbaed8f3..9686500a35 100644
--- a/doc/sphinx/language/gallina-extensions.rst
+++ b/doc/sphinx/language/gallina-extensions.rst
@@ -2208,6 +2208,13 @@ or :g:`m` to the type :g:`nat` of natural numbers).
Adds blocks of implicit types with different specifications.
+.. flag:: Printing Use Implicit Types
+
+ By default, the type of bound variables is not printed when
+ the variable name is associated to an implicit type which matches the
+ actual type of the variable. This feature can be deactivated by
+ turning this flag off.
+
.. _implicit-generalization:
Implicit generalization
diff --git a/doc/sphinx/user-extensions/syntax-extensions.rst b/doc/sphinx/user-extensions/syntax-extensions.rst
index 7c628e534b..8bfcab0f4e 100644
--- a/doc/sphinx/user-extensions/syntax-extensions.rst
+++ b/doc/sphinx/user-extensions/syntax-extensions.rst
@@ -417,6 +417,27 @@ identifiers or tokens starting with a single quote are dropped.
Locate "exists".
Locate "exists _ .. _ , _".
+Inheritance of the properties of arguments of constants bound to a notation
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+If the right-hand side of a notation is a partially applied constant,
+the notation inherits the implicit arguments (see
+:ref:`ImplicitArguments`) and interpretation scopes (see
+:ref:`Scopes`) of the constant. For instance:
+
+.. coqtop:: in reset
+
+ Record R := {dom : Type; op : forall {A}, A -> dom}.
+ Notation "# x" := (@op x) (at level 8).
+
+.. coqtop:: all
+
+ Check fun x:R => # x 3.
+
+As an exception, if the right-hand side is just of the form
+:n:`@@qualid`, this conventionally stops the inheritance of implicit
+arguments (but not of interpretation scopes).
+
Notations and binders
~~~~~~~~~~~~~~~~~~~~~
@@ -1415,6 +1436,12 @@ Abbreviations
denoted expression is performed at definition time. Type checking is
done only at the time of use of the abbreviation.
+ Like for notations, if the right-hand side of an abbreviation is a
+ partially applied constant, the abbreviation inherits the implicit
+ arguments and interpretation scopes of the constant. As an
+ exception, if the right-hand side is just of the form :n:`@@qualid`,
+ this conventionally stops the inheritance of implicit arguments.
+
.. _numeral-notations:
Numeral notations