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

Generic style to/from for ADTS #84

Closed
fommil opened this issue Nov 7, 2017 · 6 comments
Closed

Generic style to/from for ADTS #84

fommil opened this issue Nov 7, 2017 · 6 comments

Comments

@fommil
Copy link
Contributor

fommil commented Nov 7, 2017

like in shapeless it would be great to have a way of automatically going to and from a Prod for case classes and case objects, and to/from Cop for sealed traits.

In addition, it would be great to have specialised equivalents for tuples and scalaz disjunctions.

@andyscott
Copy link
Member

Related proof of concept #53

@fommil
Copy link
Contributor Author

fommil commented Nov 26, 2017

Another proof of concept: https://gitlab.com/fommil/scalaz-deriving/blob/master/scalaz-deriving/src/main/scala/scalaz/IotaMacros.scala

My macros are blackbox, not whitebox, which I think is very useful. Then all is needed is a whitebox wrapper around this which can create the TList and .Aux.

@fommil
Copy link
Contributor Author

fommil commented Mar 4, 2018

I'll probably rewrite my macros to support scalaz.Isomorphism in the mapping as it's generally useful in scalaz.

@andyscott
Copy link
Member

Do you want to add any of this directly to Iota?

@fommil
Copy link
Contributor Author

fommil commented Mar 5, 2018

oh yes, definitely. But it's much faster for me to have it in scalaz-deriving when I'm working on it.

@fommil
Copy link
Contributor Author

fommil commented Jul 9, 2018

This exists btw, if anybody wants it I'd be happy to contribute it but I don't have the time to refactor it and raise a PR.

@fommil fommil closed this as completed Jul 20, 2018
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