8000 [Numeral notations] Use Coqlib registered constants by vbgl · Pull Request #8720 · rocq-prover/rocq · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[Numeral notations] Use Coqlib registered constants #8720

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

Merged
merged 2 commits into from
Jan 31, 2019

Conversation

vbgl
Copy link
Contributor
@vbgl vbgl commented Oct 12, 2018

Fixes #8564.

Waiting for HoTT release, see #8720 (comment)

@vbgl vbgl added kind: cleanup Code removal, deprecation, refactorings, etc. part: notations The notation system. labels Oct 12, 2018
@vbgl vbgl requested review from herbelin and ppedrot as code owners October 12, 2018 12:34
@vbgl vbgl added this to the 8.10+beta1 milestone Oct 12, 2018
@vbgl vbgl force-pushed the coqlib-numeral-notations branch from 7b187f1 to ff1786e Compare October 12, 2018 14:37
@@ -40,7 +40,7 @@ Notation zero := (D0 Nil).

(** For signed integers, we use two constructors [Pos] and [Neg]. *)

Inductive int := Pos (d:uint) | Neg (d:uint).
Variant int := Pos (d:uint) | Neg (d:uint).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree it’s unrelated. But since I was already touching this file, I took the opportunity to tidy it a bit…

Copy link
Member
@JasonGross JasonGross left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

CErrors.user_err
(pr_qualid f ++ str " should go from Decimal.int to " ++
pr_qualid ty ++ str " or (option " ++ pr_qualid ty ++ str ")." ++
fnl () ++ str "Instead of Decimal.int, the types Decimal.uint or Z could be used" ++
(if loadZ then str " (require BinNums first)." else str "."))
fnl () ++ str "Instead of Decimal.int, the types Decimal.uint or Z could be used.")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the reason for dropping the parenthetical? You could instead augment it to say require BinNums or Register a constant as ... first.

Either way, please also update the documentation to match the updated error message.

@JasonGross JasonGross added the needs: documentation Documentation was not added or updated. label Oct 15, 2018
@vbgl vbgl force-pushed the coqlib-numeral-notations branch from ff1786e to cd16bfd Compare October 16, 2018 08:13
@vbgl vbgl requested a review from a team as a code owner October 16, 2018 08:13
@vbgl
Copy link
Contributor Author
vbgl commented Oct 16, 2018

I’ve just updated the error messages and the corresponding documentation.

@Zimmi48 Zimmi48 removed the needs: documentation Documentation was not added or updated. label Oct 16, 2018
CErrors.user_err
(pr_qualid g ++ str " should go from " ++ pr_qualid ty ++
str " to Decimal.int or (option Decimal.int)." ++ fnl () ++
str "Instead of Decimal.int, the types Decimal.uint or Z could be used" ++
(if loadZ then str " (require BinNums first)." else str "."))
str "Instead of Decimal.int, the types Decimal.uint or Z could be used (you may need to require BinNums or Decimal first).")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you should only display the part about Require if the types don't resolve / aren't registered. But I don't object strongly.

@vbgl vbgl force-pushed the coqlib-numeral-notations branch 2 times, most recently from 0efce69 to c10e3cd Compare October 30, 2018 08:11
@vbgl vbgl added the needs: merge of dependency This PR depends on another PR being merged first. label Oct 31, 2018
@vbgl
Copy link
Contributor Author
vbgl commented Oct 31, 2018

This PR breaks HoTT; the overlay is ready but would break the compatibility of HoTT with Coq 8.9. Thus we wait: 1. that Coq 8.9 is released (or at least the β); 2. that a version of HoTT compatible with said version of Coq is officially tagged; 3. that HoTT merges the overlay.

No need to hurry.

Copy link
Member
@ppedrot ppedrot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll let people more knowledgeable comment.

@SkySkimmer
Copy link
Contributor

needs: merge of dependency

What's the dependency?

@vbgl
Copy link
Contributor Author
vbgl commented Dec 14, 2018

I think the answer is in my previous message: #8720 (comment)

@SkySkimmer
Copy link
Contributor

I've only seen that tag used for other Coq PRs before but I guess nothing else fits better.

@vbgl vbgl force-pushed the coqlib-numeral-notations branch from c10e3cd to c9eddfe Compare January 25, 2019 08:25
@vbgl vbgl requested a review from a team as a code owner January 25, 2019 08:25
@vbgl vbgl force-pushed the coqlib-numeral-notations branch from c9eddfe to 0fdc539 Compare January 25, 2019 08:57
@vbgl vbgl removed the needs: merge of dependency This PR depends on another PR being merged first. label Jan 25, 2019
@vbgl
Copy link
Contributor Author
vbgl commented Jan 25, 2019

HoTT has been updated, so this PR is ready now.

Copy link
Member
@JasonGross JasonGross left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My requests about error messages stand, but I'm not going to block this PR on that basis, and it would be nice to see this land.

@ejgallego
Copy link
Member

Taking this as part of @coq/parsing-maintainers

@ejgallego ejgallego self-assigned this Jan 27, 2019
Copy link
Member
@ejgallego ejgallego left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look pretty straightforward, will merge soon if not further comments.

@vbgl vbgl mentioned this pull request Jan 30, 2019
7 tasks
@ejgallego ejgallego merged commit 0fdc539 into rocq-prover:master Jan 31, 2019
ejgallego added a commit that referenced this pull request Jan 31, 2019
Reviewed-by: JasonGross
Ack-by: SkySkimmer
Reviewed-by: Zimmi48
Reviewed-by: ejgallego
Ack-by: ppedrot
Ack-by: vbgl
@vbgl vbgl deleted the coqlib-numeral-notations branch January 31, 2019 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: cleanup Code removal, deprecation, refactorings, etc. part: notations The notation system.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants
0