Looking for the “Derive through newtype” proposal
I remember reading a GHC proposal for letting users derive instances by wrapping the type in a newtype. It would go something like this:
newtype Apply f a = Apply f a instance (Applicative f, Monoid a) => Monoid (Apply f a) ... data Foo a = ... deriving Monoid through Apply instance Applicative Foo ...
I think that Icelandjack had made this proposal, but I cannot find it anywhere on the GHC proposals github. Does anyone know where this is?
Submitted August 10, 2017 at 09:51PM by andrewthad
via reddit http://ift.tt/2wxzZ0j