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

suggestion: import for entire typedecl groups #48

Open
chetmurthy opened this issue Apr 19, 2020 · 0 comments
Open

suggestion: import for entire typedecl groups #48

chetmurthy opened this issue Apr 19, 2020 · 0 comments

Comments

@chetmurthy
Copy link

I'm writing a version of ppx_import for camlp5, and I noticed that there is only import for individual type-declarations. But just as we don't like to write down the RHS of a type-decl, we might not want to write down all the type-names, either. So it might be nice to have (e.g.)

[%%import: MLast.expr [@with
    loc := MLast.loc ;
    type_var := MLast.type_var
]] [@@deriving show]
``
which imports all types in the typedecl group that contains "expr" in the module MLast.  And then does the specified substitution.  I just implemented this, and it was .... not much work at all, so I thought I'd suggest it.
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

No branches or pull requests

1 participant