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.
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.)