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

Custom interpreters #20

Open
rizo opened this issue Mar 14, 2019 · 1 comment
Open

Custom interpreters #20

rizo opened this issue Mar 14, 2019 · 1 comment

Comments

@rizo
Copy link
Contributor

rizo commented Mar 14, 2019

Currently depyt provides some useful interpreters for printing, serialization, etc., but it does not provide support for implementation of custom interpreters. The public API hides the internals of the fields and variants, for example. This significantly limits the scope of applications for a generics library, in my opinion.

As a workaround I'm currently using a fork of depyt in a project that simply removes the mli file, allowing me to implement a custom interpreter for 'a Depyt.t values.

Have you thought about this restriction? Would it be possible to expose some private parts of the API to support this?

P.S. I wouldn't mind contributing these changes if we can agree on a concrete design.

@nickbetteridge
Copy link

This would be a useful addition - I have also had to fork and embed a custom encoder/decoder

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