Skip to content

Commit

Permalink
doc(coq): changelog and doc for Coq macro
Browse files Browse the repository at this point in the history
Signed-off-by: Ali Caglayan <[email protected]>
  • Loading branch information
Alizter committed Sep 24, 2022
1 parent da71ae9 commit 6159791
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@

- dune install: copy files in an atomic way (#6150, @emillon)

- Add `%{coq:...}` macro for accessing data about the configuration about Coq.
For instance `%{coq:version}` (#6049, @Alizter)

3.4.1 (26-07-2022)
------------------

Expand Down
1 change: 1 addition & 0 deletions doc/concepts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ Dune supports the following variables:
variable ``<var>``, or ``<default>`` if it does not exist.
For example, ``%{env:BIN=/usr/bin}``.
Available since Dune 1.4.0.
- There are some Coq-specific variables detailed in :ref:`coq-variables`.

In addition, ``(action ...)`` fields support the following special variables:

Expand Down
22 changes: 22 additions & 0 deletions doc/coq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -543,3 +543,25 @@ Limitations
* When new dependencies are added to a file (via a Coq ``Require`` vernacular
command), it is in principle required to save the file and restart to Coq
toplevel process.

.. _coq-variables:

Coq-Specific Variables
----------------------

There are some special variables that can be used to access data about the Coq
configuration. These are:

- ``%{coq:version}`` the version of Coq.
- ``%{coq:version.major}`` the major version of Coq (e.g., ``8.15.2`` gives
``8``).
- ``%{coq:version.minor}`` the minor version of Coq (e.g., ``8.15.2`` gives
``15``).
- ``%{coq:version.suffix}`` the suffix version of Coq (e.g., ``8.15.2`` gives
``.2`` and ``8.15+rc1`` gives ``+rc1``).
- ``%{coq:ocaml-version}`` the version of OCaml used to compile Coq.
- ``%{coq:coqlib}`` the output of ``COQLIB`` from ``coqc -config``.
- ``%{coq:coq_native_compiler_default}`` the output of
``COQ_NATIVE_COMPILER_DEFAULT`` from ``coqc -config``.

See :ref:`variables` for more information on variables supported by Dune.

0 comments on commit 6159791

Please sign in to comment.