Commit e888b943 authored by Herbert Valerio Riedel's avatar Herbert Valerio Riedel 🕺 Committed by Austin Seipp

Hide `Data.OldList` module

Summary:
The `Data.OldList` module was originally created in
3daf0023 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
parent 86dda8f7
......@@ -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
......
......@@ -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)
......
......@@ -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)
......
......@@ -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’
-- !!! 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
......
-- !!! 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
......
module T7963a where
import Prelude ()
import Data.OldList
import GHC.List
unlines = concat
......@@ -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)
......@@ -3,7 +3,7 @@
module T7360 where
import Data.OldList as L
import GHC.List as L
data Foo = Foo1 | Foo2 | Foo3 !Int
......
......@@ -6,7 +6,7 @@
module ShouldCompile where
import Data.OldList (null)
import GHC.List (null)
import Prelude hiding (null)
class HasEmpty a where
......
......@@ -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
]
......@@ -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
]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment