
26 Jul
2015
26 Jul
'15
9:18 a.m.
On 07/25/2015 05:13 PM, David Feuer wrote:
We could add a newtype for this in Data.Monoid.
newtype Appl f a = Appl (f a) instance (Applicative f, Monoid a) => Monoid (Appl f a) where mempty = Appl $ pure mempty mplus (Appl x) (Appl y) = Appl $ liftA2 mplus x y
I like this idea, it would go well with the recently-added Alt newtype. You should make it a separate proposal, though. I'm +0 on the parent proposal.