Closed Lysxia closed 6 years ago
This is really great.
I'd like to suggest one thing for consideration. It feels like DefaultFields
is doing too much. Would it be better to omit Profunctor
/ProductProfunctor
/SumProfunctor
from DefaultFields
? Perhaps there could be a different type synonym for it.
That sounds good. I'll split DefaultFields
.
@Lysxia This was great stuff. Can you split DefaultFields
so I can merge your PR?
Hi, I think I already did that! (The last commit is after my comment.)
Ah yes! It would be nice to have a ProfunctorType p
which picks which of ProductProfunctor
and/or SumProfunctor
are needed, but that can be done later.
Thanks for this patch. It makes things a lot nicer.
DefaultPConstraints
resolves to the minimal subset of ProductProfunctor
and SumProfunctor
for a given generic type.
Thanks! I totally misunderstood how you implemented this because to understand how it worked I only looked at the tests :)
@Lysxia @hesselink Look how nice your Generics PRs made the Opaleye tutorial!
https://github.com/tomjaguarpaw/haskell-opaleye/compare/generic?expand=1
No more TH and just one genericAdaptor
that works in all cases!
That's great!
Looks great!
Provides some constraint synonyms so the users have fewer characters to type with large types (at the cost of
UndecidableInstances
). See tests for some examples.I can't see a way to leverage
PartialTypeSignatures
and work around the issues you encountered in #34.