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

Why not add the feature to ppx derivers directly? #3

Open
gasche opened this issue Jul 10, 2019 · 1 comment
Open

Why not add the feature to ppx derivers directly? #3

gasche opened this issue Jul 10, 2019 · 1 comment

Comments

@gasche
Copy link

gasche commented Jul 10, 2019

Naive question: instead of creating a dedicated ppx for this, have you considered improving ppx_deriving and ppx_type_conv/ppxlib to fetch the correct definition in this case?

@giltho
Copy link
Contributor

giltho commented Nov 26, 2020

Hi ! I'm looking into this because of #5.
Right now Ppxlib.Deriving as well as ppx_deriving only allows one to derive structures from types (or module types).
In this case, since we need the case of flow parser to work :

module rec A : sig
   type t = string
   type tt = B.t
end = A and
B : sig
    type t = int
    type tt = A.t
end = B

But there are no way of doing this only with module types.

I think that's what you meant by "improving ppx_deriving to fetch the correct definition" ?
I think that deriving structure items from other structure items is quite tricky thing to do, as opposed to deriving structure items from types...

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

2 participants