diff options
| author | Maxime Dénès | 2019-12-03 11:02:37 +0100 |
|---|---|---|
| committer | Maxime Dénès | 2019-12-03 11:02:37 +0100 |
| commit | de91f71b2e25e66ba4dd1f1db6582f5fea205591 (patch) | |
| tree | d9c7671a07c0412491c93d847bd9aac7b085e838 /doc | |
| parent | 80401463e3f217be770959a646e1f87f5c8d2d5a (diff) | |
| parent | bfae260f7ba026e17e0cc599b8507bd133c4edc0 (diff) | |
Merge PR #11162: [CS] support #[local] attribute
Ack-by: SkySkimmer
Reviewed-by: Zimmi48
Reviewed-by: maximedenes
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/changelog/07-commands-and-options/11162-local-cs.rst | 1 | ||||
| -rw-r--r-- | doc/sphinx/language/gallina-extensions.rst | 7 |
2 files changed, 5 insertions, 3 deletions
diff --git a/doc/changelog/07-commands-and-options/11162-local-cs.rst b/doc/changelog/07-commands-and-options/11162-local-cs.rst new file mode 100644 index 0000000000..5a69a107cd --- /dev/null +++ b/doc/changelog/07-commands-and-options/11162-local-cs.rst @@ -0,0 +1 @@ +- Handle the ``#[local]`` attribute in :g:`Canonical Structure` declarations (`#11162 <https://github.com/coq/coq/pull/11162>`_, by Enrico Tassi). diff --git a/doc/sphinx/language/gallina-extensions.rst b/doc/sphinx/language/gallina-extensions.rst index ae0afc7819..8caa289a47 100644 --- a/doc/sphinx/language/gallina-extensions.rst +++ b/doc/sphinx/language/gallina-extensions.rst @@ -2003,10 +2003,11 @@ applied to an unknown structure instance (an implicit argument) and a value. The complete documentation of canonical structures can be found in :ref:`canonicalstructures`; here only a simple example is given. -.. cmd:: Canonical {? Structure } @qualid +.. cmd:: {? Local | #[local] } Canonical {? Structure } @qualid This command declares :token:`qualid` as a canonical instance of a - structure (a record). + structure (a record). When the :g:`#[local]` attribute is given the effect + stops at the end of the :g:`Section` containig it. Assume that :token:`qualid` denotes an object ``(Build_struct`` |c_1| … |c_n| ``)`` in the structure :g:`struct` of which the fields are |x_1|, …, |x_n|. @@ -2069,7 +2070,7 @@ in :ref:`canonicalstructures`; here only a simple example is given. See :ref:`canonicalstructures` for a more realistic example. - .. cmdv:: Canonical {? Structure } @ident {? : @type } := @term + .. cmdv:: {? Local | #[local] } Canonical {? Structure } @ident {? : @type } := @term This is equivalent to a regular definition of :token:`ident` followed by the declaration :n:`Canonical @ident`. |
