Skip to content

[ltac] accept constrN, open_constrN and uconstrN as a tactic argument - #22329

Open
gares wants to merge 1 commit into
rocq-prover:masterfrom
gares:constr_entry_n
Open

[ltac] accept constrN, open_constrN and uconstrN as a tactic argument#22329
gares wants to merge 1 commit into
rocq-prover:masterfrom
gares:constr_entry_n

Conversation

@gares

@gares gares commented Aug 3, 2026

Copy link
Copy Markdown
Member

I believe this PR lifts one of the main limitations when it comes to defining tactic syntax without using ocaml (or Ltac2).

@gares
gares requested a review from a team as a code owner August 3, 2026 09:58
@coqbot-app coqbot-app Bot added the needs: full CI The latest GitLab pipeline that ran was a light CI. Say "@coqbot run full ci" to get a full CI. label Aug 3, 2026
Comment thread plugins/ltac/tacentries.ml Outdated
Comment thread plugins/ltac/tacentries.ml Outdated
Comment thread plugins/ltac/tacentries.ml Outdated
@SkySkimmer

Copy link
Copy Markdown
Contributor

What is this trying to solve and why can't you use ltac2 instead?

@gares

gares commented Aug 3, 2026

Copy link
Copy Markdown
Member Author

I will try to use Ltac2, I guess I need a way to call elpi from it.

@gares

gares commented Aug 3, 2026

Copy link
Copy Markdown
Member Author

I'm rediscovering the wheel here I guess, but I see I can't call SSR tactics from Ltac2, so the problem is not just Elpi :-/

@gares

gares commented Aug 3, 2026

Copy link
Copy Markdown
Member Author

Thanks for the fix, now the code seems more legit.
There is still one bug, the open and u constr variants are interpreted as constr, and I can't really tell why.

Comment thread plugins/ltac/tacentries.ml Outdated
@gares gares added needs: documentation Documentation was not added or updated. needs: changelog entry This should be documented in doc/changelog. labels Aug 3, 2026
Comment thread plugins/ltac/tacentries.ml Outdated
@SkySkimmer

Copy link
Copy Markdown
Contributor

I'm rediscovering the wheel here I guess, but I see I can't call SSR tactics from Ltac2, so the problem is not just Elpi :-/

You should fix that instead of hacking ltac1.

@gares

gares commented Aug 3, 2026

Copy link
Copy Markdown
Member Author

Ideally yes, but it is much more work :-(

@SkySkimmer

Copy link
Copy Markdown
Contributor

IDK if this PR is ever going tobe merged though

@gares

gares commented Aug 3, 2026

Copy link
Copy Markdown
Member Author

How hard is to make ARGUMENT/TACTIC extend also edit the Ltac2 grammar?

@SkySkimmer

Copy link
Copy Markdown
Contributor

It goes against how ltac2 works.

@gares

gares commented Aug 3, 2026

Copy link
Copy Markdown
Member Author

Is there a way to have SSR in Ltac2 without rewriting the grammar using Ltac2 notations?

@gares gares changed the title [rfc] accept constrN as a tactic argument [ltac] accept constrN, open_constrN and uconstrN as a tactic argument Aug 3, 2026
@SkySkimmer

Copy link
Copy Markdown
Contributor

Some of it may be exposed as ltac2 syntactic classes from ocaml (eg intropatterns)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs: changelog entry This should be documented in doc/changelog. needs: documentation Documentation was not added or updated. needs: full CI The latest GitLab pipeline that ran was a light CI. Say "@coqbot run full ci" to get a full CI.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants