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
Ltac2 preterm antiquotation $preterm:x
#17359
Conversation
I don't like the proliferation of built-in syntax for terms in Ltac2. We should be able to derive it from ltac2 quotations + proper functions to pretype a term. IIUC that's already possible today after #16740? |
|
But then it calls for a more principled approach where we have to provide this kind of expressive antiquotation that prevents the pretyper to redo the work. Just that it's general and needs not be either a constr or a uconstr. |
138ae37
to
17011f8
Compare
$$x
17011f8
to
33a209a
Compare
33a209a
to
52e6e4f
Compare
$$x
$preterm:x
I changed the syntax to |
let test_dollar_ident_colon_ident = | ||
let open Pcoq.Lookahead in | ||
to_entry "test_dollar_ident_colon_ident" begin | ||
lk_kw "$" >> lk_ident >> lk_kw ":" >> lk_ident >> check_no_space |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: check this is the correct no-space lookahead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine, I added some tests
52e6e4f
to
c0be1f6
Compare
@coqbot run full ci |
c0be1f6
to
25eba52
Compare
@coqbot merge now |
@ppedrot: Please take care of the following overlays:
|
Adapt to coq/coq#17359 (ltac2_var_quotation)
Using syntax
$$x
Close #13977
Overlays: