Skip to content
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

HB breaks the parsing of commas (tuples, "in" clauses, etc) #453

Open
silene opened this issue Oct 24, 2024 · 4 comments · May be fixed by #454
Open

HB breaks the parsing of commas (tuples, "in" clauses, etc) #453

silene opened this issue Oct 24, 2024 · 4 comments · May be fixed by #454

Comments

@silene
Copy link

silene commented Oct 24, 2024

From HB Require Import structures.

Lemma foo (v1: plus 1 2 = 0) : False.
Proof.
unfold plus in v1, v1.
(* Syntax error: [in_clause] expected after 'in' (in [clause]). *)
Check (v1, v1).
(* Syntax error: [term level 200] expected after '(' (in [term]). *)

A space is now needed before commas, e.g., unfold plus in v1 , v1.

@gares
Copy link
Member

gares commented Oct 25, 2024

@CohenCyril I'm not very good with notations, and since this code is copy pasted from an old code of mine the problem could be here:

https://github.com/math-comp/hierarchy-builder/blob/9d256b8ec2d8de15975aa8de94cd1336cb41f070/HB/structures.v#L1212C1-L1220C14

@silene if you rename v1 into w1, does it work? Maybe the problem is that v1, is now a keyword.

@gares
Copy link
Member

gares commented Oct 25, 2024

I don't see any other possible causes, but admit all my ignorance on the subject...

@silene
Copy link
Author

silene commented Oct 25, 2024

Indeed, this is the likely culprit.

Print Grammar constr.
(*
| "0" LEFTA
  [ "[find"; "v1,"; "..,"; term LEVEL "200"; "|"; term LEVEL "200"; "∼"; term LEVEL "200"; "]"; NEXT
*)

I guess you can just remove this notation since it obviously has never been used.

@gares gares linked a pull request Oct 25, 2024 that will close this issue
@gares
Copy link
Member

gares commented Oct 25, 2024

I wonder what the RHS of the notation looks like internally...
Anyway I opened a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants