
The relation between Foldable and Traversable is similar to the one between
Applicative and Monad: Traversable does not require Foldable, but every
Traversable has a Foldable instance (given by foldMalDefault). That's why
there is the superclass constraint.
Jonathon Delgado
It seems that Traversable is doing two things:
1) Changing the shape of a data structure. 2) Folding over the contents of a data structure.
Traversable requires Foldable to enable 2, but Traversable is also applied to types such as (,) where only 1 is relevant.
If this is correct, follow-up questions would be:
1) For educational purposes, could these concerns be split without substantial drawback? 2) For practical purposes, could this be done without breaking a lot of existing code? _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.