Haskell Foldable Wast

Henning Thielemann lemming at henning-thielemann.de
Tue Feb 23 08:45:14 UTC 2016

On Sun, 21 Feb 2016, Jeremy wrote:

> Marcin Mrotek wrote
>> I think that, as far as Foldable is concerned, a tuple is equivalent to
>> Identity, so this instance is indeed useless. However, Foldable is a
>> superclass of Traversable (and it wouldn't make much sense to make these
>> classes unrelated, as one can always define folds with `traverse`), so
>> I've
>> always found it a necessary evil.
> Perhaps the case of tuple is evidence that Foldable should *not* be a
> superclass of Traversable?

For me, pairs should also not be Traversable. I have Writer monad for this 

More information about the Libraries mailing list