diff options
author | Ben Gamari <ben@smart-cactus.org> | 2019-12-29 21:03:35 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-02-08 10:17:55 -0500 |
commit | c2e301aeeae353a64be43e5fa9e7d464797d5648 (patch) | |
tree | b5b4b564552c3731079528dadbdc138cafad7498 /libraries | |
parent | 7d452be454857549679b93a0682a3f6fedf5d7c1 (diff) | |
download | haskell-c2e301aeeae353a64be43e5fa9e7d464797d5648.tar.gz |
compiler: Qualify imports of Data.List
Diffstat (limited to 'libraries')
-rw-r--r-- | libraries/base/Data/Version.hs | 2 | ||||
-rw-r--r-- | libraries/base/Debug/Trace.hs | 2 | ||||
-rw-r--r-- | libraries/base/Prelude.hs | 32 | ||||
-rw-r--r-- | libraries/base/Text/Printf.hs | 2 |
4 files changed, 23 insertions, 15 deletions
diff --git a/libraries/base/Data/Version.hs b/libraries/base/Data/Version.hs index 6fb0169d12..6a284642c1 100644 --- a/libraries/base/Data/Version.hs +++ b/libraries/base/Data/Version.hs @@ -42,7 +42,7 @@ import Data.Bool ( (&&) ) import Data.Char ( isDigit, isAlphaNum ) import Data.Eq import Data.Int ( Int ) -import Data.List +import Data.List ( map, sort, concat, concatMap, intersperse, (++) ) import Data.Ord import Data.String ( String ) import GHC.Generics diff --git a/libraries/base/Debug/Trace.hs b/libraries/base/Debug/Trace.hs index cfeefbc0ae..1b977bae6e 100644 --- a/libraries/base/Debug/Trace.hs +++ b/libraries/base/Debug/Trace.hs @@ -53,7 +53,7 @@ import GHC.IO.Encoding import GHC.Ptr import GHC.Show import GHC.Stack -import Data.List +import Data.List (null, partition) -- $setup -- >>> import Prelude diff --git a/libraries/base/Prelude.hs b/libraries/base/Prelude.hs index f7b2fd9c2e..66ea603e72 100644 --- a/libraries/base/Prelude.hs +++ b/libraries/base/Prelude.hs @@ -101,25 +101,32 @@ module Prelude ( seq, ($!), -- * List operations - map, (++), filter, - head, last, tail, init, null, length, (!!), - reverse, + List.map, (List.++), List.filter, + List.head, List.last, List.tail, List.init, (List.!!), + Foldable.null, Foldable.length, + List.reverse, -- *** Special folds - and, or, any, all, - concat, concatMap, + Foldable.and, Foldable.or, Foldable.any, Foldable.all, + Foldable.concat, Foldable.concatMap, -- ** Building lists -- *** Scans - scanl, scanl1, scanr, scanr1, + List.scanl, List.scanl1, List.scanr, List.scanr1, -- *** Infinite lists - iterate, repeat, replicate, cycle, + List.iterate, List.repeat, List.replicate, List.cycle, -- ** Sublists - take, drop, splitAt, takeWhile, dropWhile, span, break, + List.take, List.drop, + List.takeWhile, List.dropWhile, + List.span, List.break, + List.splitAt, -- ** Searching lists - notElem, lookup, + Foldable.notElem, + List.lookup, -- ** Zipping and unzipping lists - zip, zip3, zipWith, zipWith3, unzip, unzip3, + List.zip, List.zip3, + List.zipWith, List.zipWith3, + List.unzip, List.unzip3, -- ** Functions on strings - lines, words, unlines, unwords, + List.lines, List.words, List.unlines, List.unwords, -- * Converting to and from @String@ -- ** Converting to @String@ @@ -157,9 +164,10 @@ module Prelude ( import Control.Monad import System.IO import System.IO.Error -import Data.List +import qualified Data.List as List import Data.Either import Data.Foldable ( Foldable(..) ) +import qualified Data.Foldable as Foldable import Data.Functor ( (<$>) ) import Data.Maybe import Data.Traversable ( Traversable(..) ) diff --git a/libraries/base/Text/Printf.hs b/libraries/base/Text/Printf.hs index f8d3f02281..3aeb0be789 100644 --- a/libraries/base/Text/Printf.hs +++ b/libraries/base/Text/Printf.hs @@ -94,7 +94,7 @@ module Text.Printf( import Data.Char import Data.Int -import Data.List +import Data.List (stripPrefix) import Data.Word import Numeric import Numeric.Natural |