-
Notifications
You must be signed in to change notification settings - Fork 93
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
Getting tool_name from rewriter and/or derivers #61
Comments
It turns out my ugly workaround doesn't even work so my current solution is to always silently ignore abstract types. What I'd really want is to only ignore them in an |
Indeed, we don't forward this information in ppxlib. Adding the forwarding of this information might be invasive, but given that this is a global property of the running instance, maybe we can get away with a global setting. For instance, we could add a function like this to
|
I'm usually not too fond of such globals but if you feel like that's the way to go that definitely works for me! Actually what would you think about adding such a Let me know which one you'd prefer and I'll have a go at it! |
Passing a context around does look better indeed. If you are happy to have a go then I'm all for it! |
Ok great! I'm not too familiar with |
You can start by passing the context to the various functions in |
I had a quick look earlier and was under the impression that any transformation you register through My first approach was then to try and modify While your suggestion seems indeed easier to implement, I'm worried that unless I'm missing something, it would require one to register a raw transformation to benefit from those changes. |
Yes, you are right, we do need to update |
I started working on this again as the changes in #67 make it much easier! |
Following ocaml/dune#1861 I'm trying to add a specific behaviour when my
ppxlib
based deriver is used in anocamldep
context.ocaml-migrate-parsetree
seems to make it available through a config argument but I can't seem to find how I could access it fromppxlib
.I worked out an ugly solution to come around that limitation for now but if I'm indeed not missing something, it might be useful to find a way to pass it on to the actual
ast -> ast
function.The text was updated successfully, but these errors were encountered: