-
Notifications
You must be signed in to change notification settings - Fork 48
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 generic #68
base: master
Are you sure you want to change the base?
Generic generic #68
Conversation
nice! |
I'd rather do more general instance: instance (All SListI a, f ~ I) => Generic (SOP f a) where
.... I don't think that |
Done :-) |
I've been thinking about this instance in the past, but I've always been hesitating because it isn't actually giving you a generic representation of a SOP. Could you explain your use case in more detail? |
My exact use-case:
the corresponding table in your schema may have a serial primary key. With this instance, we can keep the idiomatic |
I see. I think I'd feel slightly more comfortable to define a different newtype-wrapper around |
The reason this is useful is to be able to combine
Rep
s of different types, and pretend that they are actually aGeneric
type on their own.