From e631d8c69d73493718518904f2b524207d5ac6e4 Mon Sep 17 00:00:00 2001 From: Erik de Castro Lopo Date: Fri, 12 Jul 2024 17:08:41 +1000 Subject: [PATCH] ghc-9.10: Hide foldl' from Prelude to avoid name collision The `base` that ships with `ghc-9.10` (base version 4.20.*) exports the function `foldl'` so we need to hide its to avoid a name collision. --- strict-containers/src/Data/Strict/HashMap/Autogen/Internal.hs | 2 +- .../src/Data/Strict/HashMap/Autogen/Internal/Array.hs | 2 +- strict-containers/src/Data/Strict/IntMap/Autogen/Internal.hs | 2 +- .../src/Data/Strict/IntMap/Autogen/Strict/Internal.hs | 2 +- strict-containers/src/Data/Strict/Map/Autogen/Internal.hs | 2 +- .../src/Data/Strict/Map/Autogen/Strict/Internal.hs | 2 +- strict-containers/src/Data/Strict/Vector/Autogen.hs | 2 +- strict-containers/src/Data/Strict/Vector/Autogen/Mutable.hs | 2 +- strict-containers/tests/intmap-properties.hs | 2 +- strict-containers/tests/map-properties.hs | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/strict-containers/src/Data/Strict/HashMap/Autogen/Internal.hs b/strict-containers/src/Data/Strict/HashMap/Autogen/Internal.hs index dfcae84..1c11ff2 100644 --- a/strict-containers/src/Data/Strict/HashMap/Autogen/Internal.hs +++ b/strict-containers/src/Data/Strict/HashMap/Autogen/Internal.hs @@ -158,7 +158,7 @@ import Data.Strict.HashMap.Autogen.Internal.List (isPermutationBy, unorderedComp import Data.Semigroup (Semigroup (..), stimesIdempotentMonoid) import GHC.Exts (Int (..), Int#, TYPE, (==#)) import GHC.Stack (HasCallStack) -import Prelude hiding (filter, foldl, foldr, lookup, map, +import Prelude hiding (filter, foldl, foldl', foldr, lookup, map, null, pred) import Text.Read hiding (step) diff --git a/strict-containers/src/Data/Strict/HashMap/Autogen/Internal/Array.hs b/strict-containers/src/Data/Strict/HashMap/Autogen/Internal/Array.hs index e789d17..d7f4230 100644 --- a/strict-containers/src/Data/Strict/HashMap/Autogen/Internal/Array.hs +++ b/strict-containers/src/Data/Strict/HashMap/Autogen/Internal/Array.hs @@ -94,7 +94,7 @@ import GHC.Exts (Int (..), SmallArray#, SmallMutableArray#, unsafeFreezeSmallArray#, unsafeThawSmallArray#, writeSmallArray#) import GHC.ST (ST (..)) -import Prelude hiding (all, filter, foldMap, foldl, foldr, length, +import Prelude hiding (all, filter, foldMap, foldl, foldl', foldr, length, map, read, traverse) import qualified GHC.Exts as Exts diff --git a/strict-containers/src/Data/Strict/IntMap/Autogen/Internal.hs b/strict-containers/src/Data/Strict/IntMap/Autogen/Internal.hs index 29ababb..7a440e8 100644 --- a/strict-containers/src/Data/Strict/IntMap/Autogen/Internal.hs +++ b/strict-containers/src/Data/Strict/IntMap/Autogen/Internal.hs @@ -306,7 +306,7 @@ import Control.DeepSeq (NFData(rnf)) import Data.Bits import qualified Data.Foldable as Foldable import Data.Maybe (fromMaybe) -import Prelude hiding (lookup, map, filter, foldr, foldl, null) +import Prelude hiding (lookup, map, filter, foldr, foldl, foldl', null) import Data.IntSet.Internal (Key) import qualified Data.IntSet.Internal as IntSet diff --git a/strict-containers/src/Data/Strict/IntMap/Autogen/Strict/Internal.hs b/strict-containers/src/Data/Strict/IntMap/Autogen/Strict/Internal.hs index d13892f..1827b5e 100644 --- a/strict-containers/src/Data/Strict/IntMap/Autogen/Strict/Internal.hs +++ b/strict-containers/src/Data/Strict/IntMap/Autogen/Strict/Internal.hs @@ -255,7 +255,7 @@ module Data.Strict.IntMap.Autogen.Strict.Internal ( #endif ) where -import Prelude hiding (lookup,map,filter,foldr,foldl,null) +import Prelude hiding (lookup,map,filter,foldr,foldl,foldl',null) import Data.Bits import qualified Data.Strict.IntMap.Autogen.Internal as L diff --git a/strict-containers/src/Data/Strict/Map/Autogen/Internal.hs b/strict-containers/src/Data/Strict/Map/Autogen/Internal.hs index 949b4f6..cca40b5 100644 --- a/strict-containers/src/Data/Strict/Map/Autogen/Internal.hs +++ b/strict-containers/src/Data/Strict/Map/Autogen/Internal.hs @@ -383,7 +383,7 @@ import qualified Data.Foldable as Foldable #if MIN_VERSION_base(4,10,0) import Data.Bifoldable #endif -import Prelude hiding (lookup, map, filter, foldr, foldl, null, splitAt, take, drop) +import Prelude hiding (lookup, map, filter, foldr, foldl, foldl', null, splitAt, take, drop) import qualified Data.Set.Internal as Set import Data.Set.Internal (Set) diff --git a/strict-containers/src/Data/Strict/Map/Autogen/Strict/Internal.hs b/strict-containers/src/Data/Strict/Map/Autogen/Strict/Internal.hs index 84cc3b2..d8da78c 100644 --- a/strict-containers/src/Data/Strict/Map/Autogen/Strict/Internal.hs +++ b/strict-containers/src/Data/Strict/Map/Autogen/Strict/Internal.hs @@ -308,7 +308,7 @@ module Data.Strict.Map.Autogen.Strict.Internal , valid ) where -import Prelude hiding (lookup,map,filter,foldr,foldl,null,take,drop,splitAt) +import Prelude hiding (lookup,map,filter,foldr,foldl,foldl',null,take,drop,splitAt) import Data.Strict.Map.Autogen.Internal ( Map (..) diff --git a/strict-containers/src/Data/Strict/Vector/Autogen.hs b/strict-containers/src/Data/Strict/Vector/Autogen.hs index e1daa62..b6c93af 100644 --- a/strict-containers/src/Data/Strict/Vector/Autogen.hs +++ b/strict-containers/src/Data/Strict/Vector/Autogen.hs @@ -202,7 +202,7 @@ import Prelude hiding ( length, null, zipWith, zipWith3, zip, zip3, unzip, unzip3, filter, takeWhile, dropWhile, span, break, elem, notElem, - foldl, foldl1, foldr, foldr1, foldMap, + foldl, foldl', foldl1, foldr, foldr1, foldMap, all, any, and, or, sum, product, minimum, maximum, scanl, scanl1, scanr, scanr1, enumFromTo, enumFromThenTo, diff --git a/strict-containers/src/Data/Strict/Vector/Autogen/Mutable.hs b/strict-containers/src/Data/Strict/Vector/Autogen/Mutable.hs index 83af3c4..380f309 100644 --- a/strict-containers/src/Data/Strict/Vector/Autogen/Mutable.hs +++ b/strict-containers/src/Data/Strict/Vector/Autogen/Mutable.hs @@ -76,7 +76,7 @@ import Data.Strict.Vector.Autogen.Internal.Check import Data.Primitive.Array import Control.Monad.Primitive -import Prelude hiding ( length, null, replicate, reverse, read, +import Prelude hiding ( length, foldl', null, replicate, reverse, read, take, drop, splitAt, init, tail, foldr, foldl, mapM_ ) import Data.Typeable ( Typeable ) diff --git a/strict-containers/tests/intmap-properties.hs b/strict-containers/tests/intmap-properties.hs index 1c1d238..35eb0c7 100644 --- a/strict-containers/tests/intmap-properties.hs +++ b/strict-containers/tests/intmap-properties.hs @@ -21,7 +21,7 @@ import Data.Ord import Data.Foldable (foldMap) import Data.Function import Data.Traversable (Traversable(traverse), foldMapDefault) -import Prelude hiding (lookup, null, map, filter, foldr, foldl) +import Prelude hiding (lookup, null, map, filter, foldr, foldl, foldl') import qualified Prelude (map) import Data.List (nub,sort) diff --git a/strict-containers/tests/map-properties.hs b/strict-containers/tests/map-properties.hs index 1fa62d5..0f2287f 100644 --- a/strict-containers/tests/map-properties.hs +++ b/strict-containers/tests/map-properties.hs @@ -25,7 +25,7 @@ import qualified Data.Foldable as Foldable #if MIN_VERSION_base(4,10,0) import qualified Data.Bifoldable as Bifoldable #endif -import Prelude hiding (lookup, null, map, filter, foldr, foldl, take, drop, splitAt) +import Prelude hiding (lookup, null, map, filter, foldr, foldl, foldl', take, drop, splitAt) import qualified Prelude import Data.List (nub,sort)