Skip to content

suggestion: import for entire typedecl groups #48

Open
@chetmurthy

Description

@chetmurthy

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions