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

negative integers not accepted in ltac integer_list -- same bug on coq 8.11.1 #12228

Closed
moninje opened this issue May 1, 2020 · 2 comments · Fixed by #12541
Closed

negative integers not accepted in ltac integer_list -- same bug on coq 8.11.1 #12228

moninje opened this issue May 1, 2020 · 2 comments · Fixed by #12541
Labels
part: ltac Issues and PRs related to the Ltac tactic language.
Milestone

Comments

@moninje
Copy link
Contributor

moninje commented May 1, 2020

Description of the problem

pattern n at -2 works, but not when called within a yser-defined tactic.

Definition MARQ {A: Type} (x:A) := x.
Tactic Notation "mark" constr(P) "at" integer_list(L) :=
pattern P at L;
match goal with |- ?f ?x => change (f (MARQ x)) end;
cbv beta.
Goal forall n, n + n = n + n.
intro n.
mark n at 2 3.
Undo 1.
pattern n at -2.
Undo 1.
mark n at -2.
(* Error:
Anomaly
"Uncaught exception File "pretyping/find_subterm.ml", line 57, characters 4-10: Assertion failed."
Please report at http://coq.inria.fr/bugs/.
*)

Coq Version

8.9.0

@moninje moninje changed the title negative integers not accepted in ltac integer_list negative integers not accepted in ltac integer_list -- same bug on coq 8.11.1 May 6, 2020
@moninje
Copy link
Contributor Author

moninje commented May 6, 2020

The first example was unnecessarily long, here is a minimal version in 3 lines.
Same bug on 8.9.0 and 8.11.1

Tactic Notation "mark" constr(P) "at" integer_list(L) := pattern P at L.
Goal 0 = 0.
mark 0 at -2.

@ppedrot ppedrot added the part: ltac Issues and PRs related to the Ltac tactic language. label May 7, 2020
ppedrot added a commit that referenced this issue Jun 29, 2020
@coqbot coqbot added this to the 8.12.0 milestone Jun 29, 2020
Zimmi48 pushed a commit to Zimmi48/coq that referenced this issue Jun 29, 2020
Zimmi48 added a commit to Zimmi48/coq that referenced this issue Jun 29, 2020
@proux01
Copy link
Contributor

proux01 commented Jun 30, 2020

Thanks @moninje for reporting and sorry for the late answer. This is fixed in master. The fix should land in 8.12.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
part: ltac Issues and PRs related to the Ltac tactic language.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants