From: Ross Paterson Date: Wed, 2 Jun 2010 21:21:54 +0000 (+0000) Subject: expand Foldable instance for Array X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=1906fa0ba252543de65c1ab666914584c8812d80;p=ghc-base.git expand Foldable instance for Array --- diff --git a/Data/Foldable.hs b/Data/Foldable.hs index 9f7d3e9..c44f0cd 100644 --- a/Data/Foldable.hs +++ b/Data/Foldable.hs @@ -162,6 +162,9 @@ instance Foldable [] where instance Ix i => Foldable (Array i) where foldr f z = Prelude.foldr f z . elems + foldl f z = Prelude.foldl f z . elems + foldr1 f = Prelude.foldr1 f . elems + foldl1 f = Prelude.foldl1 f . elems -- | Fold over the elements of a structure, -- associating to the right, but strictly.