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

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


On Mon, Jun 20, 2011 at 2:21 PM, Antoine Latter <aslatter at gmail.com> 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: <http://www.haskell.org/pipermail/libraries/attachments/20110620/a1d3b037/attachment.htm>


More information about the Libraries mailing list