New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: per-hint Hint Mode #14126
Comments
Why is that? It seems to me that adding a local hint mode saying that in the section you want a more relaxed mode to get the default instances is the right thing to do. Also, the pattern annotation on a Hint is already a more precise information than a mode. |
After chatting on coq-call with Matthieu, there are the following three use-cases:
|
More use cases: It is fairly common that for a given typeclass, different instances want different This also just came up again for me where I wanted to add some new |
I think my intuitive understand would be that the two modes are applied independently:
So, if the instance has no mode, everything behaves as it does now. If instance and class both have modes, then any class mode and the instance mode must apply. Originally posted by @RalfJung in #17945 (comment) @RalfJung you speak of "the instance mode", but shouldn't we permit multiple disjunctive instance modes? |
Yeah I guess allowing multiple per-instance modes would be a natural generalization. It might make the syntax harder to figure out though.
|
Why not use the same syntax as the current |
I was thinking the mode would be somehow part of the |
Description of the problem
I have a typeclass for which most instances are keyed by all parameters, except in sections where I prove lemmas about arbitrary instances of that typeclass I want the instance in the context to be used for typeclass resolution when the parameters are not known. I've been setting
Local Hint Mode
in that section as a workaround, but that applies to allRequire
d instances, so I don't expect it to keep working out as I want.Coq Version
8.13.1
@mattam82 ?
The text was updated successfully, but these errors were encountered: