-
Notifications
You must be signed in to change notification settings - Fork 84
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
Meta-programming library #1116
Meta-programming library #1116
Conversation
In my logrel experiments I ended up writing some code to do locally nameless shenanigans (computing fresh names wrt a term, opening and closing a binder), I guess it would make sense to add it here too? :) |
Sure! |
Co-authored-by: Yannick Forster <[email protected]>
@MevenBertrand for the locally nameless stuff it would make sense to wait a bit. I will be implementing unification in the next weeks which involves adding named contexts (and utility functions around named contexts) to template-coq :) |
Ah, great! Then I won't do it myself. FYI, my current ugly code is here. |
I integrated my changes :
|
@MevenBertrand and @TheoWinterhalter if CI passes then I'm ready to merge |
Thanks. One thing we need to discuss before merge is the use of the What is the stance of others? I see Mathis that you reverted some of our changes in that direction, is it a strong opinion? At least in the |
I don't have a strong opinion yet :)
|
I don't get your comment "because then all error messages are that the monad was not found", can you explain ? |
I meant relying on |
Oh I see, this is an issue since the $ functions are only Would changing the $ functions so that they use |
Yeah, this is how they were before and I think this would be much better. |
I reverted to tmBind/tmReturn. Still I think completely removing the template monad is not good idea, but I'm open to discussion. Also I moved the traversal functions to AstUtils.v (because of dependency considerations : this way we can use the traversal functions in template-coq itself. |
The remaining failures seem to be due to faulty extraction (and orthogonal to the modifications we did in this branch). I don't know how to solve them, could someone have a look ? |
Maybe there is a misunderstanding because I think what you did is perfect. Thanks. |
The errors seem completely unrelated to our changes… But maybe it's because now |
Some of the errors (those which are due to recent changes in coq-core or coq-stdlib) are also present in the main branch of metacoq, and I think I've solved them in this branch. For the extraction errors, I have no idea... |
Maybe I shouldn't have made the PR against |
Just changing the base branch here doesn't work, can you refactor a bit @MathisBD so we can file against 8.20? |
I'm closing since this has been merged into coq.8-20. |
We have been using this prelude for the MetaCoq tutorial and our MPRI course, and we've updated it to include nice combinators.
I open this draft to keep track of the consolidation efforts to make it part of the MetaCoq meta-programming library