Skip to content

Add Binary instance for Generically newtype #212

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

Closed
wants to merge 1 commit into from

Conversation

jvanbruegge
Copy link

@jvanbruegge jvanbruegge commented Jun 8, 2025

This allows to derive Binary instances with DerivingVia instead of DeriveAnyClass:

data MyData = MkMyData { foo :: Int }
  deriving Generic
  deriving Binary via Generically MyData

@jvanbruegge
Copy link
Author

There should probably be a test for this instance, should I just convert some of the empty instances in benchmarks/GenericsBenchTypes.hs to use standalone deriving with Generically or something else?

@jvanbruegge
Copy link
Author

I somehow missed #192

@jvanbruegge jvanbruegge closed this Jun 8, 2025
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

Successfully merging this pull request may close these issues.

1 participant