CoqWG Activity
Ana de Almeida Borges edited this page Feb 18, 2022
·
1 revision
Discussion for issue https://github.com/coq/coq/issues/14907 Draft PR: https://github.com/coq/coq/pull/15683
participants: Ana, Rodrigo, Ali, Emilio
- SerAPI has a similar command, we had a look, just a wrapper over existing Coq APIs.
- Difference between the notation information, and the parser grammar (once the notation has been added)
- Notations in Coq are just strings, i.e. "_ + _". See
Notgram_ops.get_defined_notations
- Implementation to happen in two phases:
- First phase: register a new vernac command
- Second phase: implement the command's functionality
To register a new vernac command:
- update
vernac/vernacexpr.ml
to add an ast forPrint Notation
- update
vernac/g_vernac.mlg
to add a parsing rule (similar to other Print stuff, grep forPrintCoercions
) - hook in
vernac/vernacentries
the implementation:
The implementation has to:
- resolve user input (here you may want to split Notation.locate_notation)
- query Coq for notation data (
Notgram_ops.grammar_of_notation
) - display notation data (up to what we consider pleasant)
Additional concerns:
- what to when there are many candidates (as in
Locate "+".
) - Separation of concerns between logic and display
- Tuesday 15/02/2022
- The vernac command has been added.
- A PR has been submitted: https://github.com/coq/coq/pull/15683
- Wednesday 16/02/2022
- The vernac command now prints information about the level and the associativity.
- Thursday 17/02/2022
- An error message is now produced when the notation can not be found.
[Emilio will fill some details and pointers]
To the extent possible under law, the contributors of “Cocorico!, the Coq wiki” have waived all copyright and related or neighboring rights to their contributions.
By contributing to Cocorico!, the Coq wiki, you agree that you hold the copyright and you agree to license your contribution under the CC0 license or you agree that you have permission to distribute your contribution under the CC0 license.