Alternative.some and NonEmpty
Henning Thielemann
lemming at henning-thielemann.de
Tue Mar 7 17:11:55 UTC 2017
On Tue, 7 Mar 2017, Mario Blažević wrote:
> On 2017-03-07 11:40 AM, Henning Thielemann wrote:
>
>> I think it must be Monoid (m a). But it won't work, because NonEmpty is
>> no Monoid because there is no mempty.
>
> You're correct on both counts, sorry about that. It would have to be
>
> genericMany, genericSome ::
> (Alternative f, Applicative m, Semigroup (m a)) => f a -> f (m a)
>
> once Semigroup is in base.
But then, for genericMany, Monoid would be appropriate, again. :-)
More information about the Libraries
mailing list