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

deriving support #30

Closed
fommil opened this issue Jun 18, 2018 · 3 comments
Closed

deriving support #30

fommil opened this issue Jun 18, 2018 · 3 comments

Comments

@fommil
Copy link

fommil commented Jun 18, 2018

hi!

I was just wondering if you did anything more on the deriving support?

Also you didn't raise a merge request against https://gitlab.com/fommil/scalaz-deriving/ so I can't see our work 😄

@carymrobbins
Copy link
Member

For sure, some other stuff took priority, but I was actually able to get things working by adding code to the plugin - https://gitlab.com/carymrobbins/scalaz-deriving/tree/newtype

Here's a branch with some fixes for newtype that make the feature above work - https://github.com/estatico/scala-newtype/tree/deriving

As it currently stands I think the remaining work needed is to prevent the companion object from extending Function when a companion is not defined.

@fommil
Copy link
Author

fommil commented Jun 21, 2018

hmm. Disabling extending the function might be very complicated to pull off, since we're just duplicating what scalac does. The right thing to do there is to use class instead of case class. (Or on your side you could remove Function if it is synthetic)

@carymrobbins
Copy link
Member

Turned out to be pretty simple, let's see what you think - https://gitlab.com/fommil/scalaz-deriving/merge_requests/149

@fommil fommil closed this as completed Jun 21, 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