7 Aug
2019
7 Aug
'19
1:20 a.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