Proposal: Foldable typeclass: make foldl' and foldr' class methods

Edward Kmett ekmett at
Mon Jun 20 21:30:38 CEST 2011

On Mon, Jun 20, 2011 at 2:21 PM, Antoine Latter <aslatter at> wrote:

> On Mon, Jun 20, 2011 at 12:02 PM, Duncan Coutts
> > The only potential breakage is that foldl' and foldr' are exported via
> > Foldable(..) rather than directly. This could affect modules that use
> > explicit imports.  (I consider this fact to be a slightly unfortunate
> > quirk of the Haskell module system).

> What would the broken code look like?

import Data.Foldable (Foldable(..))
import Data.List

now you'd have two definitions of foldl' and foldr' in scope
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Libraries mailing list