Proposal: Add `Generically` (or `WrappedGeneric`) newtype to GHC.Generics

Alexis King lexi.lambda at gmail.com
Fri Aug 30 18:50:41 UTC 2019


> On Aug 30, 2019, at 13:26, Oliver Charles <ollie at ocharles.org.uk> wrote:

> 
> I haven't really thought it out, but I wonder if
> 
> newtype GenericallyUsing a c
> 
> Also works, paving the way for other generic classes.

I don’t think this really adds anything over just having two newtypes, personally. `generics-sop` could, of course, always export its own newtype for this purpose, also named `Generically` or otherwise, and I think that would be simpler without any real disadvantages. I don’t think there are very many situations where you could be usefully polymorphic in the second type parameter of `GenericallyUsing`.



More information about the Libraries mailing list