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

Strange deriving error in presence of lens.ppx_deriving #14

Open
psteckler opened this issue Oct 30, 2019 · 5 comments
Open

Strange deriving error in presence of lens.ppx_deriving #14

psteckler opened this issue Oct 30, 2019 · 5 comments

Comments

@psteckler
Copy link

See: https://discuss.ocaml.org/t/odd-deriving-error/4606

@pdonadeo
Copy link
Owner

pdonadeo commented Dec 1, 2019

@didier-wenzek what do you think?

@didier-wenzek
Copy link

I will have a look. I don't remember having done something special, neither to prevent nor to support this actual use case, where the ppx are called in cascade.

@pdonadeo
Copy link
Owner

pdonadeo commented Dec 2, 2019

Thanks @didier-wenzek. The problem is that I never dug into the ppx world so I can't reply to @psteckler.

@didier-wenzek
Copy link

I failed to reproduce the issue. I tried different combinations of derivers and transformers, but noticed no specific issues. Except that [@@deriving show][@@deriving lens] is not equivalent to [@@deriving show,lens]. The latter is working as expected, but the former ignores the second deriver (and this is not specifically due to the lens.ppx_deriving).

@psteckler can you share the [%%tranform ...] which triggers the issue. Thanks.

@psteckler
Copy link
Author

psteckler commented Dec 7, 2019

I manually inserted the code that would have been created by deriving lens here:

https://github.com/CodaProtocol/coda/blob/develop/src/lib/parallel_scan/parallel_scan.ml#L63

The transformer which contains the type is [%%versioned], a few lines above.

If you'd like to build the code, there are instructions here:

https://github.com/CodaProtocol/coda/blob/develop/README-dev.md

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

3 participants