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

Always accept antiquotations #1089

Merged
merged 2 commits into from
Apr 6, 2022
Merged

Always accept antiquotations #1089

merged 2 commits into from
Apr 6, 2022

Conversation

Kha
Copy link
Member

@Kha Kha commented Mar 31, 2022

There was some confusion about incQuotDepth on Zulip, which is unfortunate since the combinator really only exists for bootstrapping. This PR simplifies the code so that antiquotations are accepted everywhere (but still need a corresponding transformer/elaborator to actually do something). The performance impact should be offset by fast checks for the happy (non-quotation) path.

@Kha
Copy link
Member Author

Kha commented Mar 31, 2022

!bench

@Kha
Copy link
Member Author

Kha commented Mar 31, 2022

but still need a corresponding transformer/elaborator to actually do something

This PR does not yet add an elaborator for antiquotations on the top level (command and term cats), but that would definitely be possible. It would enable a Template Haskell-like approach to metaprogramming where you invoke the metaprogram using a direct, statically typed function call instead of a macro using arbitrary syntax for its parameters. Not sure if anyone has missed something like this so far (/cc @gebner @digama0?)

@leanprover-bot
Copy link
Collaborator

Here are the benchmark results for commit 94fb610.
There were no significant changes.

@Kha Kha enabled auto-merge (rebase) April 6, 2022 17:11
@Kha Kha merged commit 6841f37 into leanprover:master Apr 6, 2022
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 this pull request may close these issues.

None yet

2 participants