summaryrefslogtreecommitdiff
path: root/libraries
diff options
context:
space:
mode:
authorHerbert Valerio Riedel <hvr@gnu.org>2014-09-20 23:50:06 +0200
committerHerbert Valerio Riedel <hvr@gnu.org>2014-09-20 23:52:57 +0200
commit05cf18f883bf2d49b53a1d25cb57eff3333eb0c9 (patch)
treebb67d05939622b3b4a92e8500708353cf1e0b052 /libraries
parent1812898c0332c6807201938911bb914633267d9d (diff)
downloadhaskell-05cf18f883bf2d49b53a1d25cb57eff3333eb0c9.tar.gz
Generalise (some of) Data.List to Foldables (re #9568)
This replaces the entities in Data.List conflicting with Data.Foldable with re-exports of the generalised version from Data.Foldable. As of this commit, the following compiles w/o error module XPrelude (module X) where import Control.Monad as X import Data.Foldable as X import Data.List as X import Prelude as X Reviewed By: austin, dfeuer, ekmett Differential Revision: https://phabricator.haskell.org/D229
Diffstat (limited to 'libraries')
-rw-r--r--libraries/base/Data/List.hs7
-rw-r--r--libraries/base/changelog.md10
2 files changed, 15 insertions, 2 deletions
diff --git a/libraries/base/Data/List.hs b/libraries/base/Data/List.hs
index 44c86bb7d8..5bc812194a 100644
--- a/libraries/base/Data/List.hs
+++ b/libraries/base/Data/List.hs
@@ -207,5 +207,8 @@ module Data.List
) where
-import Data.Foldable ()
-import Data.OldList
+import Data.Foldable
+import Data.OldList hiding ( all, and, any, concat, concatMap, elem, find,
+ foldl, foldl1, foldl', foldr, foldr1, maximum,
+ maximumBy, minimum, minimumBy, notElem, or,
+ product, sum )
diff --git a/libraries/base/changelog.md b/libraries/base/changelog.md
index d82d354c91..c57d5f0e56 100644
--- a/libraries/base/changelog.md
+++ b/libraries/base/changelog.md
@@ -35,6 +35,16 @@
* Turn `toList`, `elem`, `sum`, `product`, `maximum`, and `minimum`
into `Foldable` methods (#9621)
+ * Replace the `Data.List`-exported functions
+
+ ```
+ all, and, any, concat, concatMap, elem, find, product, sum
+ ```
+
+ by re-exports of their generalised `Data.Foldable` counterparts.
+ In other words, unqualified imports of `Data.List` and
+ `Data.Foldable` no longer lead to conflicting definitions. (#9586)
+
## 4.7.0.1 *Jul 2014*
* Bundled with GHC 7.8.3