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

Gallina quotation functions for Template #894

Merged
merged 10 commits into from
Apr 6, 2023
Prev Previous commit
Next Next commit
Slightly better universe error messages in `{replace,make}_quotation_…
…of_goal`
JasonGross committed Apr 5, 2023
commit 172a6cf356314ee97a3537e937829a5cf509f49d
6 changes: 4 additions & 2 deletions quotation/theories/ToTemplate/Init.v
Original file line number Diff line number Diff line change
@@ -244,11 +244,13 @@ Defined.

Ltac replace_quotation_of_goal _ :=
let t := match goal with |- quotation_of ?t => t end in
run_template_program (replace_quotation_of t) (fun v => exact v).
let T := match goal with |- @quotation_of ?T ?t => T end in
run_template_program (@replace_quotation_of _ T t) (fun v => exact v).

Ltac make_quotation_of_goal _ :=
let t := match goal with |- quotation_of ?t => t end in
run_template_program (make_quotation_of t) (fun v => exact v).
let T := match goal with |- @quotation_of ?T ?t => T end in
run_template_program (@make_quotation_of _ T t) (fun v => exact v).

Ltac adjust_quotation_of_by_econstructor_then tac1 tac2 :=
let f := match goal with |- ?f _ => f end in