Skip to content

Commit 67752b2

Browse files
authored
Future-proof against potential Prelude.foldl' (#948)
1 parent 5382745 commit 67752b2

File tree

12 files changed

+21
-17
lines changed

12 files changed

+21
-17
lines changed

containers/src/Data/IntMap/Internal.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ import Data.Bits
311311
import qualified Data.Foldable as Foldable
312312
import Data.Maybe (fromMaybe)
313313
import Utils.Containers.Internal.Prelude hiding
314-
(lookup, map, filter, foldr, foldl, null)
314+
(lookup, map, filter, foldr, foldl, foldl', null)
315315
import Prelude ()
316316

317317
import Data.IntSet.Internal (Key)

containers/src/Data/IntMap/Lazy.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@ module Data.IntMap.Lazy (
172172
, foldMapWithKey
173173

174174
-- ** Strict folds
175-
, foldr'
176-
, foldl'
175+
, IM.foldr'
176+
, IM.foldl'
177177
, foldrWithKey'
178178
, foldlWithKey'
179179

containers/src/Data/IntMap/Strict/Internal.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ module Data.IntMap.Strict.Internal (
260260
) where
261261

262262
import Utils.Containers.Internal.Prelude hiding
263-
(lookup,map,filter,foldr,foldl,null)
263+
(lookup,map,filter,foldr,foldl,foldl',null)
264264
import Prelude ()
265265

266266
import Data.Bits

containers/src/Data/IntSet.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ module Data.IntSet (
128128
, IS.foldr
129129
, IS.foldl
130130
-- ** Strict folds
131-
, foldr'
132-
, foldl'
131+
, IS.foldr'
132+
, IS.foldl'
133133
-- ** Legacy folds
134134
, fold
135135

containers/src/Data/IntSet/Internal.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ import Data.Semigroup (Semigroup((<>)))
204204
#endif
205205
import Data.Semigroup (stimesIdempotentMonoid)
206206
import Utils.Containers.Internal.Prelude hiding
207-
(filter, foldr, foldl, null, map)
207+
(filter, foldr, foldl, foldl', null, map)
208208
import Prelude ()
209209

210210
import Utils.Containers.Internal.BitUtil

containers/src/Data/Map/Internal.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ import qualified Data.Foldable as Foldable
384384
import Data.Bifoldable
385385
#endif
386386
import Utils.Containers.Internal.Prelude hiding
387-
(lookup, map, filter, foldr, foldl, null, splitAt, take, drop)
387+
(lookup, map, filter, foldr, foldl, foldl', null, splitAt, take, drop)
388388
import Prelude ()
389389

390390
import qualified Data.Set.Internal as Set

containers/src/Data/Map/Strict/Internal.hs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,9 @@ module Data.Map.Strict.Internal
308308
, valid
309309
) where
310310

311-
import Prelude hiding (lookup,map,filter,foldr,foldl,null,take,drop,splitAt)
311+
import Utils.Containers.Internal.Prelude hiding
312+
(lookup,map,filter,foldr,foldl,foldl',null,take,drop,splitAt)
313+
import Prelude ()
312314

313315
import Data.Map.Internal
314316
( Map (..)

containers/src/Data/Sequence/Internal.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,8 @@ import Utils.Containers.Internal.Prelude hiding (
199199
#if MIN_VERSION_base(4,11,0)
200200
(<>),
201201
#endif
202-
(<$>), foldMap, Monoid,
203-
null, length, lookup, take, drop, splitAt, foldl, foldl1, foldr, foldr1,
202+
(<$>), Monoid,
203+
null, length, lookup, take, drop, splitAt,
204204
scanl, scanl1, scanr, scanr1, replicate, zip, zipWith, zip3, zipWith3,
205205
unzip, takeWhile, dropWhile, iterate, reverse, filter, mapM, sum, all)
206206
import Prelude ()
@@ -212,7 +212,7 @@ import Control.Monad (MonadPlus(..))
212212
import Data.Monoid (Monoid(..))
213213
import Data.Functor (Functor(..))
214214
import Utils.Containers.Internal.State (State(..), execState)
215-
import Data.Foldable (Foldable(foldl, foldl1, foldr, foldr1, foldMap, foldl', foldr'), toList)
215+
import Data.Foldable (foldr', toList)
216216
import qualified Data.Foldable as F
217217

218218
import qualified Data.Semigroup as Semigroup

containers/src/Data/Set.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ module Data.Set (
141141
, S.foldr
142142
, S.foldl
143143
-- ** Strict folds
144-
, foldr'
145-
, foldl'
144+
, S.foldr'
145+
, S.foldl'
146146
-- ** Legacy folds
147147
, fold
148148

containers/src/Data/Set/Internal.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ module Data.Set.Internal (
233233
) where
234234

235235
import Utils.Containers.Internal.Prelude hiding
236-
(filter,foldl,foldr,null,map,take,drop,splitAt)
236+
(filter,foldl,foldl',foldr,null,map,take,drop,splitAt)
237237
import Prelude ()
238238
import Control.Applicative (Const(..))
239239
import qualified Data.List as List

0 commit comments

Comments
 (0)