summaryrefslogtreecommitdiff
path: root/compiler/utils/Bag.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/utils/Bag.hs')
-rw-r--r--compiler/utils/Bag.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/utils/Bag.hs b/compiler/utils/Bag.hs
index 09fddccde1..46bf1f730f 100644
--- a/compiler/utils/Bag.hs
+++ b/compiler/utils/Bag.hs
@@ -30,7 +30,7 @@ import Util
import MonadUtils
import Control.Monad
import Data.Data
-import Data.List ( partition, mapAccumL )
+import Data.List ( partition, mapAccumL, foldl' )
import qualified Data.Foldable as Foldable
infixr 3 `consBag`
@@ -197,7 +197,7 @@ foldlBag :: (r -> a -> r) -> r
foldlBag _ z EmptyBag = z
foldlBag k z (UnitBag x) = k z x
foldlBag k z (TwoBags b1 b2) = foldlBag k (foldlBag k z b1) b2
-foldlBag k z (ListBag xs) = foldl k z xs
+foldlBag k z (ListBag xs) = foldl' k z xs
foldrBagM :: (Monad m) => (a -> b -> m b) -> b -> Bag a -> m b
foldrBagM _ z EmptyBag = return z