-
Notifications
You must be signed in to change notification settings - Fork 193
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
fix notations for 8.20 #2087
fix notations for 8.20 #2087
Conversation
cc @proux01 who might be interested in these warnings appearing in practice. |
Hmm there appears to be a limitation in 8.19 where I guess we either wait for the 8.20 minimal version bump for this PR to be merged or comment out the problematic notation until 8.20. |
Sounds strange, I thought we had that kind of thing everywhere. |
We have a similar set up with |
That's indeed what I had in mind, strange. |
I'd like to keep the minimal Coq version at 8.19 for a little while, as I've just started teaching a class in which students will be using the library, and they currently have 8.19.x installed. (Also, one student mentioned that VSCode doesn't yet support 8.20.) This could be merged without the problematic bit. It would also be nice if the surreal number notation didn't need to change, just to keep the diff small, but if that's not possible then no worries. |
8.20 was released a few days ago, so it might be some time for VSCoq to catch up. On the other hand, coq-lsp seems to be working fine. I agree that we shouldn't bump the minimum version this early. I'm inclined to remove the |
271852b
to
c6b44eb
Compare
Signed-off-by: Ali Caglayan <[email protected]> <!-- ps-id: 3415f5c9-de8c-4977-9877-36d2f801c4a8 -->
cdd4baf
to
a6fc13e
Compare
I've made the changes even more conservative by disabling a warning about postfix notations being recommended to be put at level 1 for a few notations that factor few an infix notation. This means we don't have to change levels in various places unnecessarily and importantly fixes the annoying warnings in 8.20 without changing the behaviour of the library. |
Great, that seems like a good way to handle it. BTW, the only remaining warnings github shows me are:
Can we just change |
@jdchristensen Those are new warnings from 8.21+alpha that are not backwards compatible. They will be warnings until I think this is part of the splitting of the stdlib / renaming of Coq project. |
I've updated my local Coq version to 8.20 and have finally been able to address the outstanding warnings.
Many warnings were about various notations having the wrong levels. If two notations exist and one can be factored into the other, then they have to be in the same level. Otherwise, Coq just doesn't parse things correctly.
An example of this happening in practice was the infix
^
notation which was being used for powers byBinInt
. Having this notation around broke^
as a postfix path inversion operator. The solution was to remove this notation, which wasn't being used anyway.The notation
{{ _ | _ // _ }}
used for the surreal numbers was causing quite a few problems due to how//
was being factored. I didn't really know the best way to fix this, so I opted to just add another/
to make it{{ _ | _ /// _ }}
. This is a bit clunky, but doesn't appear to make readability worse. We might be able to choose something more sensible in the future.