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

Edward Kmett ekmett at gmail.com
Fri Sep 19 21:25:01 UTC 2014


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


More information about the Libraries mailing list