Deprecate Foldable for Either
David Feuer
david.feuer at gmail.com
Thu Mar 2 16:48:02 UTC 2017
The problem is that we'd then lose the perfectly good Traversable instance,
which would be sad.
On Mar 2, 2017 11:23 AM, "Andreas Abel" <andreas.abel at ifi.lmu.de> wrote:
> Today a student came to me wondering why a certain function produced a
> regular result, where he had expected an error. Turned out he had used
> `concat`, but not on a lists of lists as he had thought, but on a lists of
> `Either a [b]`.
>
> With the Foldable instance for Either, which considers Either a b to be a
> container of 0-1 elements of b, errors are happily swallowed.
>
> I think this instance is harmful and should be deprecated (and later
> removed) from base.
>
> There are similarly pointless Foldable instances as well.
>
> See a discussion one year ago, which was heated, but had no consequences.
>
> https://mail.haskell.org/pipermail/libraries/2016-February/026678.html
>
>
> --
> Andreas Abel <>< Du bist der geliebte Mensch.
>
> Department of Computer Science and Engineering
> Chalmers and Gothenburg University, Sweden
>
> andreas.abel at gu.se
> http://www.cse.chalmers.se/~abela/
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20170302/609cb966/attachment.html>
More information about the Libraries
mailing list