[commit: base] master: Use nicer type variables in foldlM's type sig (60ef83a)
Ian Lynagh
igloo at earth.li
Sat Nov 10 16:32:38 CET 2012
Repository : ssh://darcs.haskell.org//srv/darcs/packages/base
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/60ef83aceccff7bd260ce48f97522b4a3d8a98df
>---------------------------------------------------------------
commit 60ef83aceccff7bd260ce48f97522b4a3d8a98df
Author: Ian Lynagh <ian at well-typed.com>
Date: Sat Nov 10 14:17:11 2012 +0000
Use nicer type variables in foldlM's type sig
>---------------------------------------------------------------
Data/Foldable.hs | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Data/Foldable.hs b/Data/Foldable.hs
index afd9afa..0f23195 100644
--- a/Data/Foldable.hs
+++ b/Data/Foldable.hs
@@ -195,7 +195,7 @@ foldrM f z0 xs = foldl f' return xs z0
-- | Monadic fold over the elements of a structure,
-- associating to the left, i.e. from left to right.
-foldlM :: (Foldable t, Monad m) => (a -> b -> m a) -> a -> t b -> m a
+foldlM :: (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m b
foldlM f z0 xs = foldr f' return xs z0
where f' x k z = f z x >>= k
More information about the Cvs-libraries
mailing list