[generics-rep] Newtypes for deriving via #241
Labels
status: blocked
This issue or PR is blocked by something and cannot make progress.
type: enhancement
A new feature or addition.
With deriving via and some newtypes we could simulate defaults methods and alleviate a bit the implementation of typeclasses with generic defaults.
For instance implementing
Show
,Enum
andBounded
:Could be a bit more compact:
Writing those newtypes is straightforward and I gladly volonteer. The only annoyance is how to name them:
GenericBounded
isn’t taken butGenericShow
andGenericEnum
refer to the typeclasses implemented by the generic representation.Would it be acceptable to rename the typeclasses to
GenericRep*
and keepGeneric*
for the newtypes? Or has someone a better naming scheme to propose?The text was updated successfully, but these errors were encountered: