-
Notifications
You must be signed in to change notification settings - Fork 632
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
Bad line number for warning about implicit Global
on Instance
#14704
Comments
cc @ppedrot |
Unfortunately I don't think there is an easy way for that. When porting the code, the script I wrote was performing a reverse lookup with a bounded number of lines to find the corresponding instance command. Quite hackish but was working OK in most of the cases. See ppedrot@ba3f284. |
So I take it the locality check is being performed at qed time. Is there anyway to do a preliminary check before entering proof mode? Also, this might be a bit hackish, but isn't there code to jump to the start of a deceleration? I've seen this behaviour when trying to Qed an invalid CoFixpoint. So it seems to me that such information can be stored. |
Or maybe a way to remember the spam (line and column) of the declaration so that we Qed time one can still print warnings pointing at the declaration? |
See #14705 |
Is there any chance this can be backported to the 8.14 branch? Right now all developments being ported to 8.14 show massive amounts of warnings about unqualified EDIT: Ah I see this is already tracked at #15030. |
Description of the problem
The following code:
produces a warning on Coq master:
However, the line number of the warning is wrong: it points at the
Qed
, when it really should point at theInstance
since that is where the problem lies.This is particularly annoying since it means automatic scripts that parse these warnings to add the missing explicit
Global
will edit the wrong line. (I found such scripts to be the only way to actually deal with this warning -- we get many dozens of these warnings in basically each of our developments; fixing them all by hand would be horrible.)Coq Version
Coq master
The text was updated successfully, but these errors were encountered: