In my project, I am attempting to maintain small hintbases in order to speed up proofs. However, when I am writing Ltac support for such architecture, I couldn't find a way to refer to the various hintbases. Essentially, I want to do the following:
Tactic Notation "myauto" ???(db) := auto with db.
It will be more complicated than that. However, Coq parser seems eagerly parse db
to be the concrete name of the hint base, and therefore error message like this will be thrown:
Error: No such Hint database: db.
Any way I can parameterize the hint base option for auto
family?
EDIT:
What you are trying to do is currently not working in Ltac.
https://github.com/coq/coq/issues/2417
You can get around your issue by either
or
Old (broken) answer:
In Coq 8.7.2 what you are looking for is the ident
argument type.
According to the definition, a Hint database is referenced by an ident
:
Create HintDb ident [discriminated]
(see https://coq.inria.fr/distrib/current/refman/tactics.html#Hints-databases for the definition)
Putting
Tactic Notation "test" ident(db) :=
auto with db.
works fine for me.
https://coq.inria.fr/distrib/current/refman/syntax-extensions.html#hevea_command236 contains a list of allowed modifiers.