[commit: ghc] master: Hide `Data.OldList` module (e888b94)

git at git.haskell.org git at git.haskell.org
Fri Nov 21 04:21:41 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/e888b943396c21db74ba2fc69bf3a89e2473ea2b/ghc

>---------------------------------------------------------------

commit e888b943396c21db74ba2fc69bf3a89e2473ea2b
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date:   Thu Nov 20 22:21:06 2014 -0600

    Hide `Data.OldList` module
    
    Summary:
    The `Data.OldList` module was originally created in
    3daf0023d2dcf7caf85d61f2dc177f8e9421b2fd to provide a way to access the
    original list-specialised functions from `Data.List`. It was also made
    an exposed module in order to facilitate adapting the
    `haskell2010`/`haskell98` packages. However, since the
    `haskell2010`/`haskell98` packages were dropped, we no longer need to
    expose `Data.OldList`.
    
    Depends on D511
    
    Reviewers: ekmett, austin
    
    Reviewed By: ekmett, austin
    
    Subscribers: thomie, carter
    
    Differential Revision: https://phabricator.haskell.org/D513


>---------------------------------------------------------------

e888b943396c21db74ba2fc69bf3a89e2473ea2b
 libraries/base/base.cabal                           | 2 +-
 libraries/base/changelog.md                         | 4 ----
 libraries/base/tests/foldableArray.hs               | 2 +-
 testsuite/tests/ghci/scripts/ghci008.stdout         | 4 ++--
 testsuite/tests/module/mod106.hs                    | 2 +-
 testsuite/tests/parser/should_fail/readFail003.hs   | 2 +-
 testsuite/tests/rename/should_compile/T7963a.hs     | 2 +-
 testsuite/tests/rename/should_fail/rnfail040.stderr | 2 +-
 testsuite/tests/simplCore/should_compile/T7360.hs   | 2 +-
 testsuite/tests/typecheck/should_compile/faxen.hs   | 2 +-
 testsuite/tests/typecheck/should_fail/mc21.hs       | 4 ++--
 testsuite/tests/typecheck/should_fail/mc24.hs       | 4 ++--
 12 files changed, 14 insertions(+), 18 deletions(-)

diff --git a/libraries/base/base.cabal b/libraries/base/base.cabal
index c3f4d28..ca619ca 100644
--- a/libraries/base/base.cabal
+++ b/libraries/base/base.cabal
@@ -154,7 +154,6 @@ Library
         Data.List
         Data.Maybe
         Data.Monoid
-        Data.OldList
         Data.Ord
         Data.Proxy
         Data.Ratio
@@ -292,6 +291,7 @@ Library
     other-modules:
         Control.Monad.ST.Imp
         Control.Monad.ST.Lazy.Imp
+        Data.OldList
         Foreign.ForeignPtr.Imp
         System.Environment.ExecutablePath
 
diff --git a/libraries/base/changelog.md b/libraries/base/changelog.md
index c5047ce..f6a5016 100644
--- a/libraries/base/changelog.md
+++ b/libraries/base/changelog.md
@@ -71,10 +71,6 @@
 
   * Generalise `Control.Monad.{foldM,foldM_}` to `Foldable`
 
-  * New module `Data.OldList` containing only list-specialised versions of
-    the functions from `Data.List` (in other words, `Data.OldList` corresponds
-    to `base-4.7.0.1`'s `Data.List`)
-
   * `foldr2` (together with `zip` and `zipWith`) is made a bit stricter in the
     second argument, so that the fusion RULES for it do not change the
     semantics. (#9596)
diff --git a/libraries/base/tests/foldableArray.hs b/libraries/base/tests/foldableArray.hs
index 5a5041f..9c87571 100644
--- a/libraries/base/tests/foldableArray.hs
+++ b/libraries/base/tests/foldableArray.hs
@@ -16,7 +16,7 @@ import Control.DeepSeq
 #if __GLASGOW_HASKELL__ < 709
 import qualified Data.List as L
 #else
-import qualified Data.OldList as L
+import qualified GHC.List as L
 #endif
 
 data BadElementException = BadFirst | BadLast deriving (Show, Typeable, Eq)
diff --git a/testsuite/tests/ghci/scripts/ghci008.stdout b/testsuite/tests/ghci/scripts/ghci008.stdout
index 057e9b2..9d9c26e 100644
--- a/testsuite/tests/ghci/scripts/ghci008.stdout
+++ b/testsuite/tests/ghci/scripts/ghci008.stdout
@@ -32,5 +32,5 @@ class (RealFrac a, Floating a) => RealFloat a where
   	-- Defined in ‘GHC.Float’
 instance RealFloat Float -- Defined in ‘GHC.Float’
 instance RealFloat Double -- Defined in ‘GHC.Float’
-Data.OldList.isPrefixOf :: Eq a => [a] -> [a] -> Bool
-  	-- Defined in ‘Data.OldList’
+base-4.8.0.0:Data.OldList.isPrefixOf :: Eq a => [a] -> [a] -> Bool
+  	-- Defined in ‘base-4.8.0.0:Data.OldList’
diff --git a/testsuite/tests/module/mod106.hs b/testsuite/tests/module/mod106.hs
index b505971..7fae66d 100644
--- a/testsuite/tests/module/mod106.hs
+++ b/testsuite/tests/module/mod106.hs
@@ -1,7 +1,7 @@
 -- !!! local aliases
 module M where
 
-import qualified Data.OldList as M
+import qualified GHC.List as M
 import qualified Data.Maybe as M
 
 x = M.length
diff --git a/testsuite/tests/parser/should_fail/readFail003.hs b/testsuite/tests/parser/should_fail/readFail003.hs
index 343e1f0..8a60e8e 100644
--- a/testsuite/tests/parser/should_fail/readFail003.hs
+++ b/testsuite/tests/parser/should_fail/readFail003.hs
@@ -1,6 +1,6 @@
 -- !!! Irrefutable patterns + guards
 module Read003 where
-import Data.OldList; import Prelude hiding (null)
+import GHC.List; import Prelude hiding (null)
 ~(a,b,c) | nullity b	= a
 	 | nullity c	= a
 	 | otherwise	= a
diff --git a/testsuite/tests/rename/should_compile/T7963a.hs b/testsuite/tests/rename/should_compile/T7963a.hs
index fc8004d..25ac408 100644
--- a/testsuite/tests/rename/should_compile/T7963a.hs
+++ b/testsuite/tests/rename/should_compile/T7963a.hs
@@ -1,7 +1,7 @@
 module T7963a where
 
 import Prelude ()
-import Data.OldList
+import GHC.List
 
 unlines = concat
 
diff --git a/testsuite/tests/rename/should_fail/rnfail040.stderr b/testsuite/tests/rename/should_fail/rnfail040.stderr
index 80fad23..c3faa92 100644
--- a/testsuite/tests/rename/should_fail/rnfail040.stderr
+++ b/testsuite/tests/rename/should_fail/rnfail040.stderr
@@ -3,7 +3,7 @@ rnfail040.hs:7:12:
     Conflicting exports for ‘nub’:
        ‘module M’ exports ‘M.nub’
          imported from ‘Data.List’ at rnfail040.hs:10:2-22
-         (and originally defined in ‘Data.OldList’)
+         (and originally defined in ‘base-4.8.0.0:Data.OldList’)
        ‘module M’ exports ‘T.nub’
          imported from ‘Rnfail040_A’ at rnfail040.hs:11:2-24
          (and originally defined at Rnfail040_A.hs:2:3-5)
diff --git a/testsuite/tests/simplCore/should_compile/T7360.hs b/testsuite/tests/simplCore/should_compile/T7360.hs
index 67c5e72..4e4703c 100644
--- a/testsuite/tests/simplCore/should_compile/T7360.hs
+++ b/testsuite/tests/simplCore/should_compile/T7360.hs
@@ -3,7 +3,7 @@
 
 module T7360 where
 
-import Data.OldList as L
+import GHC.List as L
 
 data Foo = Foo1 | Foo2 | Foo3 !Int
     
diff --git a/testsuite/tests/typecheck/should_compile/faxen.hs b/testsuite/tests/typecheck/should_compile/faxen.hs
index f65ee71..8ad56c6 100644
--- a/testsuite/tests/typecheck/should_compile/faxen.hs
+++ b/testsuite/tests/typecheck/should_compile/faxen.hs
@@ -6,7 +6,7 @@
 
 module ShouldCompile where
 
-import Data.OldList (null)
+import GHC.List (null)
 import Prelude hiding (null)
 
 class HasEmpty a where
diff --git a/testsuite/tests/typecheck/should_fail/mc21.hs b/testsuite/tests/typecheck/should_fail/mc21.hs
index adb4b91..8c13a66 100644
--- a/testsuite/tests/typecheck/should_fail/mc21.hs
+++ b/testsuite/tests/typecheck/should_fail/mc21.hs
@@ -3,11 +3,11 @@
 {-# OPTIONS_GHC -XMonadComprehensions -XTransformListComp #-}
 module ShouldFail where
 import GHC.Exts( the )
-import Data.OldList
+import GHC.List
 
 data Unorderable = Gnorf | Pinky | Brain
 
-foo = [ Data.OldList.length x
+foo = [ GHC.List.length x
       | x <- [Gnorf, Brain]
       , then group using take 5
       ]
diff --git a/testsuite/tests/typecheck/should_fail/mc24.hs b/testsuite/tests/typecheck/should_fail/mc24.hs
index 281f4ad..e5d8099 100644
--- a/testsuite/tests/typecheck/should_fail/mc24.hs
+++ b/testsuite/tests/typecheck/should_fail/mc24.hs
@@ -3,9 +3,9 @@
 
 {-# OPTIONS_GHC -XMonadComprehensions -XTransformListComp #-}
 module ShouldFail where
-import Data.OldList
+import GHC.List
 
-foo = [ Data.OldList.length x
+foo = [ GHC.List.length x
       | x <- [1..10]
       , then group by x using take 2
       ]



More information about the ghc-commits mailing list