
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.
- ocharles
On Thu, Mar 2, 2017 at 5:08 PM Francesco Ariis
On Thu, Mar 02, 2017 at 05:59:18PM +0100, Andreas Abel wrote:
Ok, Foldable is a formal condition for Traversable, but not actually used in the implementation of Traversable Either. This still leaves room to implement Foldable for Either by
instance Foldable (Either a) where foldMap _ _ = error "Folding Either? Naah, I don't think this is a good idea."
I don't fancy Foldable for Either either, but runtime failures are ugly too.
_______________________________________________ Libraries mailing list Libraries@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries