-
Notifications
You must be signed in to change notification settings - Fork 640
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
documentation lies about example tactic notation taking a reference #11727
Comments
Shouldn't we just remove this last column? It seems to me that it is bound to become outdated anyway as tactics learn new tricks. It would be adequately replaced by numerous examples. |
I think it's important to not remove it until we have the examples. Also, I think the tactics should not have tricks that are not available to tactic notations / Ltac2 tactic notations. I don't think I would have to write OCaml just to wrap a tactic and preserve syntax and flexibility |
So, this is in fact more than just a documentation issue, right? |
The non-documentation part is more properly #3224 |
Regarding Shouldn't we deprecate this tolerance, even if it requires to adapt developments? Or should we instead generalize this tolerance to all arguments expecting a global reference? Or, halfway, to all arguments expecting an evaluable reference? Feedback welcome. |
Well, at least a warning could be emitted if some argument is ignored, no? |
@herbelin Do you have an example? For example, this does not work: Goal let x := True in x.
unfold x. (* Error: The reference x was not found in the current environment. *) I could not find any variant of this that succeeded silently with no error. |
My previous message was unrelated to the issue, sorry. (I was referring to the fact that Back to the current issue, I'm proposing the following:
Additionally, here are questionable issues with
See also #11830 for questions about the Ltac2 convergence. |
FTR, Ltac2 exposes more to the user, or at least it makes easier to access bugs that were only exploitable via subtle Ltac tricks before. I'd recommend hardening of the tactic APIs against this kind of issues. This would benefit both versions since they're sharing the code. Regarding the Ltac1 fix, I'd refrain from introducing a new generic argument. This has consequences on the runtime and might break some contrived uses in the wild. If anything, we should have less genargs, not more. Also, trying to fix Ltac is a Danaides' barrel. This precise bug is about documentation, the spinoff on the reproductibility of primitive notations is solved by Ltac2 AFAIK. Thus, I would ask once again not to touch the runtime if this can be solved by tweaking the doc. |
How do you hope to have less genargs? Don't you see genargs as types (with coercions between them), even if the types are not computed statically? Don't you see this But I'd be also ok to extend the existing My feeling though is that discussing about a generalization of
I don't see why a new tactic argument would break existing Ltac code. (The semantical changes I made on the "runtime" are only about relaxing some constraints on the static interpretation of
Again, I'm not trying per se to fix a Danaides' barrel. I'm trying to reach a state where we understand what we are doing. What I'm trying to understand is a priori useful for Ltac2. The more precisely we understand the differences between Ltac1 and Ltac2, the easiest it will be to make an automatic transition (at least of the toplevel tactic calls). |
Unfortunately, genargs are a catch-all structure having deep interactions all over the place and are much more than types. Your PR is trying to solve a problem that lies in the semantics of the
Isn't not having the same runtime tag enough? That would definitely break some tactic notations where people happily use variables-but-no-so-much to refer to such values.
Yes, and I claim you're never going to reach that point trying to understand Ltac1.
Let me put it clearly: the problem is already solved in Ltac2. No need to tweak the interpretation of arguments, there is a clear separation between parsing, evaluation and runtime representation. Something that doesn't exist in Ltac1 genargs, where everything is cobbled together, not even to mention the ad-hoc hacks in the runtime to recognize static variables at runtime, and whose semantics depends on the phase of the moon.
To perform an automatic transition that works in 90% of the cases, I am afraid that it is precisely better not to try to understand the craziness underlying the Ltac1 implementation. Your PR introducing a new genarg is not only useless on that front, but it is actually counter-productive. By having more ad-hoc-ness to handle corner cases that only exist due to terrible base design, you're adding fuel to the combinatorial explosion. It ain't broken, don't fix it. |
Please don't. Or at least make it completely silent by default. And absolutely don't add it for the reduction tactics other than
Let's move discussion about this to #11794, which seems to almost be about exactly this question.
I agree a priori with minimizing the kinds of arguments tactics accept, but I think all the kinds of arguments should be exposed to the user. So I strongly support adding |
No, that's not the right solution. Evaluability is a dynamic property, as observed by @herbelin himself, and should be checked at runtime by |
@JasonGross: I meant #11840. (The point is that when I type
I'd be fine with this alternative too. In practice, when used for By the way, if I may add an extra comment: in So, I believe we all agree:
We still need to sort out the confusion around the names
So, the natural candidate is to use Is this the conclusion? (Or do we have to think more at whether this is the terminology we really want.) |
That's really unfortunate behavior.
This sounds good to me, personally. I have no strong opinions on names. |
Description of the problem
The documentation table under https://coq.inria.fr/refman/user-extensions/syntax-extensions.html#coq:cmd.tactic-notation claims that:
However,
unfold
permits far more than justreference
. Here are two examples of things that fail withreference
but succeed withunfold
:cc @herbelin cf #11721 (comment) and maybe see also #9514
Coq Version
8.10.0
The text was updated successfully, but these errors were encountered: