Proposal: Add a few extra members to Foldable and Traversable classes

David Feuer david.feuer at gmail.com
Fri Sep 19 21:26:34 UTC 2014


I'd forgotten about that, Edward. Yes, without that, one or the other would
have to change, and not necessarily for the good.

On Fri, Sep 19, 2014 at 5:25 PM, Edward Kmett <ekmett at gmail.com> wrote:

> A secondary reason for their inclusion is explicitly to avoid randomly
> changing the semantics of the versions supplied by Prelude by changing to
> the definitions from Foldable.
>
> E.g. foldl vs foldr based sum and the like.
>
> Sent from my iPhone
>
> > On Sep 19, 2014, at 5:05 PM, Henning Thielemann <
> lemming at henning-thielemann.de> wrote:
> >
> >
> >> On Fri, 19 Sep 2014, David Feuer wrote:
> >>
> >> Joachim, you may be right about sum and product; I really don't know.
> Henning: this doesn't change the Data.Foldable API at all. Data.Foldable
> already exports all of these functions, and the class would give each of
> them a valid default implementation.
> >
> > For consumers of the functions it would not change much. However, user
> instances with custom implementations of the new methods cannot be used
> with older Prelude versions anymore.
> > _______________________________________________
> > Libraries mailing list
> > Libraries at haskell.org
> > http://www.haskell.org/mailman/listinfo/libraries
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20140919/66f1ab71/attachment.html>


More information about the Libraries mailing list