Deprecate Foldable for Either

Oleg Grenrus oleg.grenrus at
Thu Mar 2 22:35:14 UTC 2017

Anecdotally, today I wrote `foldMap toList`, to use as `Maybe (NonEmpty
a) -> [a]`.
Also I rely heavily in lens-based code on the `folded :: Fold (Maybe a) a`.

So :-1: for me.

OTOH :+1: for using non-default preludes for teaching.

- Oleg

On 02.03.2017 19:35, Francesco Ariis wrote:
> On Thu, Mar 02, 2017 at 05:19:26PM +0000, Oliver Charles wrote:
>> Personally, I think it would be a shame to lose foldMap on EIther. I
>> frequently foldMap over Maybe values (where mempty is suitable in case of
>> "failure"), and I can certainly see myself doing the same thing with Either.
> I am not trying to be polemic, just to see where the community
> stands: regarding Either/Maybe: do you have use cases for length
> (sum) too?
> _______________________________________________
> Libraries mailing list
> Libraries at

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the Libraries mailing list