Skip to content

Commit

Permalink
doc for Ltac2 Globalize/Check
Browse files Browse the repository at this point in the history
  • Loading branch information
SkySkimmer committed Oct 11, 2023
1 parent 8d460e9 commit 4bb109d
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 2 deletions.
4 changes: 4 additions & 0 deletions doc/changelog/06-Ltac2-language/18139-ltac2printers.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- **Added:**
:cmd:`Ltac2 Globalize` and :cmd:`Ltac2 Check` useful to investigate the expansion of Ltac2 notations
(`#18139 <https://github.com/coq/coq/pull/18139>`_,
by Gaëtan Gilbert).
8 changes: 8 additions & 0 deletions doc/sphinx/proof-engine/ltac2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,14 @@ Printing Ltac2 tactics
:cmd:`Print` can print defined Ltac2 tactics and can avoid printing
other objects by using `Print Ltac2`.

.. cmd:: Ltac2 Globalize @ltac2_expr

Prints the result of resolving notations in the given expression.

.. cmd:: Ltac2 Check @ltac2_expr

Typechecks the given expression and prints the result.

.. cmd:: Print Ltac2 Signatures

This command displays a list of all defined tactics in scope with their types.
Expand Down
5 changes: 3 additions & 2 deletions doc/sphinx/proof-engine/vernacular-commands.rst
Original file line number Diff line number Diff line change
Expand Up @@ -434,10 +434,11 @@ Requests to the environment

.. cmd:: Locate Ltac @qualid

Like :cmd:`Locate`, but limits the search to tactics
Like :cmd:`Locate`, but limits the search to Ltac tactics

.. cmd:: Locate Ltac2 @qualid
:undocumented:

Like :cmd:`Locate`, but limits the search to Ltac2 tactics.

.. cmd:: Locate Library @qualid

Expand Down
2 changes: 2 additions & 0 deletions doc/tools/docgram/fullGrammar
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,8 @@ command: [
| "Print" "Ltac2" reference (* ltac2 plugin *)
| "Locate" "Ltac2" reference (* ltac2 plugin *)
| "Print" "Ltac2" "Signatures" (* ltac2 plugin *)
| "Ltac2" "Check" ltac2_expr6 (* ltac2 plugin *)
| "Ltac2" "Globalize" ltac2_expr6 (* ltac2 plugin *)
]

reference_or_constr: [
Expand Down
2 changes: 2 additions & 0 deletions doc/tools/docgram/orderedGrammar
Original file line number Diff line number Diff line change
Expand Up @@ -960,6 +960,8 @@ command: [
| "Print" "Ltac2" qualid (* ltac2 plugin *)
| "Locate" "Ltac2" qualid (* ltac2 plugin *)
| "Print" "Ltac2" "Signatures" (* ltac2 plugin *)
| "Ltac2" "Check" ltac2_expr (* ltac2 plugin *)
| "Ltac2" "Globalize" ltac2_expr (* ltac2 plugin *)
| "Hint" "Resolve" LIST1 [ qualid | one_term ] OPT hint_info OPT ( ":" LIST1 ident )
| "Hint" "Resolve" [ "->" | "<-" ] LIST1 qualid OPT natural OPT ( ":" LIST1 ident )
| "Hint" "Immediate" LIST1 [ qualid | one_term ] OPT ( ":" LIST1 ident )
Expand Down

0 comments on commit 4bb109d

Please sign in to comment.