
6 Aug
2019
6 Aug
'19
3:50 p.m.
Ah, sorry. (:+:) is not an Applicative. It's still possible to make instance Monoid: instance Semigroup (f a) => Semigroup ((f :+: g) a) where InL x <> InL y = InL (x <> y) InL _ <> y = y x <> _ = x instance Monoid (f a) => Monoid ((f :+: g) a) where mempty = InL mempty