summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'compiler')
-rw-r--r--compiler/GHC/Cmm/Ppr/Decl.hs2
-rw-r--r--compiler/GHC/CmmToAsm.hs2
-rw-r--r--compiler/GHC/CmmToAsm/BlockLayout.hs2
-rw-r--r--compiler/GHC/CmmToAsm/Reg/Graph/Spill.hs2
-rw-r--r--compiler/GHC/CmmToAsm/Reg/Graph/SpillClean.hs2
-rw-r--r--compiler/GHC/CmmToAsm/Reg/Linear.hs2
-rw-r--r--compiler/GHC/CmmToAsm/Reg/Liveness.hs2
-rw-r--r--compiler/GHC/Core/Make.hs2
-rw-r--r--compiler/GHC/Core/Opt/CprAnal.hs2
-rw-r--r--compiler/GHC/Core/Opt/OccurAnal.hs2
-rw-r--r--compiler/GHC/Core/Opt/SpecConstr.hs2
-rw-r--r--compiler/GHC/Core/Rules.hs2
-rw-r--r--compiler/GHC/Core/SimpleOpt.hs2
-rw-r--r--compiler/GHC/Core/Subst.hs2
-rw-r--r--compiler/GHC/Core/Tidy.hs2
-rw-r--r--compiler/GHC/Core/Unfold.hs2
-rw-r--r--compiler/GHC/Core/Utils.hs2
-rw-r--r--compiler/GHC/CoreToByteCode.hs3
-rw-r--r--compiler/GHC/Data/Graph/Color.hs2
-rw-r--r--compiler/GHC/Data/Graph/Directed.hs2
-rw-r--r--compiler/GHC/Data/Graph/Ops.hs2
-rw-r--r--compiler/GHC/Driver/CmdLine.hs2
-rw-r--r--compiler/GHC/Driver/Make.hs2
-rw-r--r--compiler/GHC/Driver/MakeFile.hs2
-rw-r--r--compiler/GHC/Driver/Session.hs2
-rw-r--r--compiler/GHC/Hs/Binds.hs2
-rw-r--r--compiler/GHC/Hs/Utils.hs2
-rw-r--r--compiler/GHC/HsToCore.hs2
-rw-r--r--compiler/GHC/HsToCore/Arrows.hs2
-rw-r--r--compiler/GHC/HsToCore/Coverage.hs2
-rw-r--r--compiler/GHC/HsToCore/Foreign/Decl.hs2
-rw-r--r--compiler/GHC/HsToCore/Quote.hs2
-rw-r--r--compiler/GHC/HsToCore/Usage.hs2
-rw-r--r--compiler/GHC/Iface/Tidy/StaticPtrTable.hs2
-rw-r--r--compiler/GHC/Linker/MacOS.hs2
-rw-r--r--compiler/GHC/Parser/Header.hs2
-rw-r--r--compiler/GHC/Parser/Lexer.x2
-rw-r--r--compiler/GHC/Parser/PostProcess.hs2
-rw-r--r--compiler/GHC/Rename/Expr.hs2
-rw-r--r--compiler/GHC/Rename/Fixity.hs2
-rw-r--r--compiler/GHC/Rename/HsType.hs2
-rw-r--r--compiler/GHC/Rename/Unbound.hs2
-rw-r--r--compiler/GHC/Rename/Utils.hs2
-rw-r--r--compiler/GHC/Runtime/Heap/Inspect.hs2
-rw-r--r--compiler/GHC/StgToCmm/Layout.hs2
-rw-r--r--compiler/GHC/StgToCmm/Monad.hs2
-rw-r--r--compiler/GHC/StgToCmm/Utils.hs2
-rw-r--r--compiler/GHC/SysTools/FileCleanup.hs2
-rw-r--r--compiler/GHC/SysTools/Info.hs2
-rw-r--r--compiler/GHC/SysTools/Tasks.hs2
-rw-r--r--compiler/GHC/Tc/TyCl.hs2
-rw-r--r--compiler/GHC/Unit/State.hs2
-rw-r--r--compiler/GHC/Utils/Error.hs2
-rw-r--r--compiler/GHC/Utils/Misc.hs16
54 files changed, 62 insertions, 61 deletions
diff --git a/compiler/GHC/Cmm/Ppr/Decl.hs b/compiler/GHC/Cmm/Ppr/Decl.hs
index c2e46c6e16..469ae66dbc 100644
--- a/compiler/GHC/Cmm/Ppr/Decl.hs
+++ b/compiler/GHC/Cmm/Ppr/Decl.hs
@@ -53,7 +53,7 @@ import GHC.Cmm
import GHC.Utils.Outputable
import GHC.Data.FastString
-import Data.List
+import Data.List (intersperse)
import qualified Data.ByteString as BS
diff --git a/compiler/GHC/CmmToAsm.hs b/compiler/GHC/CmmToAsm.hs
index 149ebbd472..daf75a1720 100644
--- a/compiler/GHC/CmmToAsm.hs
+++ b/compiler/GHC/CmmToAsm.hs
@@ -140,7 +140,7 @@ import GHC.Unit
import GHC.Data.Stream (Stream)
import qualified GHC.Data.Stream as Stream
-import Data.List
+import Data.List (sortBy, groupBy)
import Data.Maybe
import Data.Ord ( comparing )
import Control.Exception
diff --git a/compiler/GHC/CmmToAsm/BlockLayout.hs b/compiler/GHC/CmmToAsm/BlockLayout.hs
index d32357b5cc..b7c6ffb098 100644
--- a/compiler/GHC/CmmToAsm/BlockLayout.hs
+++ b/compiler/GHC/CmmToAsm/BlockLayout.hs
@@ -44,7 +44,7 @@ import GHC.Data.Maybe
import GHC.Data.List.SetOps (removeDups)
import GHC.Data.OrdList
-import Data.List
+import Data.List (sortOn, sortBy)
import Data.Foldable (toList)
import qualified Data.Set as Set
diff --git a/compiler/GHC/CmmToAsm/Reg/Graph/Spill.hs b/compiler/GHC/CmmToAsm/Reg/Graph/Spill.hs
index e290be505e..86c3590f99 100644
--- a/compiler/GHC/CmmToAsm/Reg/Graph/Spill.hs
+++ b/compiler/GHC/CmmToAsm/Reg/Graph/Spill.hs
@@ -27,7 +27,7 @@ import GHC.Utils.Outputable
import GHC.Utils.Panic
import GHC.Platform
-import Data.List
+import Data.List (nub, (\\), intersect)
import Data.Maybe
import Data.IntSet (IntSet)
import qualified Data.IntSet as IntSet
diff --git a/compiler/GHC/CmmToAsm/Reg/Graph/SpillClean.hs b/compiler/GHC/CmmToAsm/Reg/Graph/SpillClean.hs
index 42421bfb08..a93b56de95 100644
--- a/compiler/GHC/CmmToAsm/Reg/Graph/SpillClean.hs
+++ b/compiler/GHC/CmmToAsm/Reg/Graph/SpillClean.hs
@@ -51,7 +51,7 @@ import GHC.Utils.Panic
import GHC.Platform
import GHC.Cmm.Dataflow.Collections
-import Data.List
+import Data.List (nub, foldl1', find)
import Data.Maybe
import Data.IntSet (IntSet)
import qualified Data.IntSet as IntSet
diff --git a/compiler/GHC/CmmToAsm/Reg/Linear.hs b/compiler/GHC/CmmToAsm/Reg/Linear.hs
index 849f600465..4b44c14b6c 100644
--- a/compiler/GHC/CmmToAsm/Reg/Linear.hs
+++ b/compiler/GHC/CmmToAsm/Reg/Linear.hs
@@ -139,7 +139,7 @@ import GHC.Utils.Panic
import GHC.Platform
import Data.Maybe
-import Data.List
+import Data.List (partition, nub)
import Control.Monad
import Control.Applicative
diff --git a/compiler/GHC/CmmToAsm/Reg/Liveness.hs b/compiler/GHC/CmmToAsm/Reg/Liveness.hs
index c19a8085a8..bf53ecf421 100644
--- a/compiler/GHC/CmmToAsm/Reg/Liveness.hs
+++ b/compiler/GHC/CmmToAsm/Reg/Liveness.hs
@@ -67,7 +67,7 @@ import GHC.Types.Unique.Supply
import GHC.Data.Bag
import GHC.Utils.Monad.State
-import Data.List
+import Data.List (mapAccumL, groupBy, partition)
import Data.Maybe
import Data.IntSet (IntSet)
diff --git a/compiler/GHC/Core/Make.hs b/compiler/GHC/Core/Make.hs
index b2dc4f4555..35428156b9 100644
--- a/compiler/GHC/Core/Make.hs
+++ b/compiler/GHC/Core/Make.hs
@@ -87,7 +87,7 @@ import GHC.Utils.Panic
import GHC.Data.FastString
-import Data.List
+import Data.List ( partition )
import Data.Char ( ord )
infixl 4 `mkCoreApp`, `mkCoreApps`
diff --git a/compiler/GHC/Core/Opt/CprAnal.hs b/compiler/GHC/Core/Opt/CprAnal.hs
index d1a5de100d..e47d4007de 100644
--- a/compiler/GHC/Core/Opt/CprAnal.hs
+++ b/compiler/GHC/Core/Opt/CprAnal.hs
@@ -34,7 +34,7 @@ import GHC.Utils.Error ( dumpIfSet_dyn, DumpFormat (..) )
import GHC.Data.Maybe ( isJust, isNothing )
import Control.Monad ( guard )
-import Data.List
+import Data.List ( mapAccumL )
{- Note [Constructed Product Result]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/compiler/GHC/Core/Opt/OccurAnal.hs b/compiler/GHC/Core/Opt/OccurAnal.hs
index 5e2f77ec28..343ddfe618 100644
--- a/compiler/GHC/Core/Opt/OccurAnal.hs
+++ b/compiler/GHC/Core/Opt/OccurAnal.hs
@@ -52,7 +52,7 @@ import GHC.Utils.Misc
import GHC.Data.Maybe( orElse, isJust )
import GHC.Utils.Outputable
import GHC.Utils.Panic
-import Data.List
+import Data.List (mapAccumL, mapAccumR)
{-
************************************************************************
diff --git a/compiler/GHC/Core/Opt/SpecConstr.hs b/compiler/GHC/Core/Opt/SpecConstr.hs
index ccff26df78..8ffe04ab25 100644
--- a/compiler/GHC/Core/Opt/SpecConstr.hs
+++ b/compiler/GHC/Core/Opt/SpecConstr.hs
@@ -61,7 +61,7 @@ import GHC.Data.FastString
import GHC.Types.Unique.FM
import GHC.Utils.Monad
import Control.Monad ( zipWithM )
-import Data.List
+import Data.List (nubBy, sortBy, partition)
import GHC.Builtin.Names ( specTyConKey )
import GHC.Unit.Module
import GHC.Core.TyCon ( TyCon )
diff --git a/compiler/GHC/Core/Rules.hs b/compiler/GHC/Core/Rules.hs
index 4516899b88..5d5330d510 100644
--- a/compiler/GHC/Core/Rules.hs
+++ b/compiler/GHC/Core/Rules.hs
@@ -68,7 +68,7 @@ import GHC.Data.FastString
import GHC.Data.Maybe
import GHC.Data.Bag
import GHC.Utils.Misc as Utils
-import Data.List
+import Data.List (sortBy, mapAccumL, isPrefixOf)
import Data.Function ( on )
import Control.Monad ( guard )
diff --git a/compiler/GHC/Core/SimpleOpt.hs b/compiler/GHC/Core/SimpleOpt.hs
index a26be7e0ae..bf9602bdaf 100644
--- a/compiler/GHC/Core/SimpleOpt.hs
+++ b/compiler/GHC/Core/SimpleOpt.hs
@@ -54,7 +54,7 @@ import GHC.Utils.Panic
import GHC.Utils.Misc
import GHC.Data.Maybe ( orElse )
import GHC.Data.FastString
-import Data.List
+import Data.List (mapAccumL)
import qualified Data.ByteString as BS
{-
diff --git a/compiler/GHC/Core/Subst.hs b/compiler/GHC/Core/Subst.hs
index a4e702e83a..918733a725 100644
--- a/compiler/GHC/Core/Subst.hs
+++ b/compiler/GHC/Core/Subst.hs
@@ -66,7 +66,7 @@ import GHC.Data.Maybe
import GHC.Utils.Misc
import GHC.Utils.Outputable
import GHC.Utils.Panic
-import Data.List
+import Data.List (mapAccumL)
diff --git a/compiler/GHC/Core/Tidy.hs b/compiler/GHC/Core/Tidy.hs
index db24e861cd..a1b66ec3f8 100644
--- a/compiler/GHC/Core/Tidy.hs
+++ b/compiler/GHC/Core/Tidy.hs
@@ -31,7 +31,7 @@ import GHC.Types.Unique.FM
import GHC.Types.Name hiding (tidyNameOcc)
import GHC.Types.SrcLoc
import GHC.Data.Maybe
-import Data.List
+import Data.List (mapAccumL)
{-
************************************************************************
diff --git a/compiler/GHC/Core/Unfold.hs b/compiler/GHC/Core/Unfold.hs
index 345be79df4..0d0df57f57 100644
--- a/compiler/GHC/Core/Unfold.hs
+++ b/compiler/GHC/Core/Unfold.hs
@@ -63,7 +63,7 @@ import GHC.Types.Name
import GHC.Utils.Error
import qualified Data.ByteString as BS
-import Data.List
+import Data.List (isPrefixOf)
-- | Unfolding options
diff --git a/compiler/GHC/Core/Utils.hs b/compiler/GHC/Core/Utils.hs
index 3115e163f1..a67955ad2b 100644
--- a/compiler/GHC/Core/Utils.hs
+++ b/compiler/GHC/Core/Utils.hs
@@ -104,7 +104,7 @@ import GHC.Utils.Misc
import GHC.Data.Pair
import Data.ByteString ( ByteString )
import Data.Function ( on )
-import Data.List
+import Data.List ( sort, sortBy, partition, zipWith4, mapAccumL )
import Data.Ord ( comparing )
import GHC.Data.OrdList
import qualified Data.Set as Set
diff --git a/compiler/GHC/CoreToByteCode.hs b/compiler/GHC/CoreToByteCode.hs
index 0e2f93ebec..79604c3639 100644
--- a/compiler/GHC/CoreToByteCode.hs
+++ b/compiler/GHC/CoreToByteCode.hs
@@ -65,7 +65,8 @@ import GHC.Data.Maybe
import GHC.Types.Var.Env
import GHC.Builtin.Names ( unsafeEqualityProofName )
-import Data.List
+import Data.List ( genericReplicate, genericLength, intersperse
+ , partition, scanl', sort, sortBy, zip4, zip6, nub )
import Foreign
import Control.Monad
import Data.Char
diff --git a/compiler/GHC/Data/Graph/Color.hs b/compiler/GHC/Data/Graph/Color.hs
index 4f7d74df40..0e96b5da01 100644
--- a/compiler/GHC/Data/Graph/Color.hs
+++ b/compiler/GHC/Data/Graph/Color.hs
@@ -28,7 +28,7 @@ import GHC.Utils.Outputable
import GHC.Utils.Panic
import Data.Maybe
-import Data.List
+import Data.List (mapAccumL)
-- | Try to color a graph with this set of colors.
diff --git a/compiler/GHC/Data/Graph/Directed.hs b/compiler/GHC/Data/Graph/Directed.hs
index 451d31f125..7a17f23e7c 100644
--- a/compiler/GHC/Data/Graph/Directed.hs
+++ b/compiler/GHC/Data/Graph/Directed.hs
@@ -54,7 +54,7 @@ import GHC.Data.Maybe ( expectJust )
-- std interfaces
import Data.Maybe
import Data.Array
-import Data.List hiding (transpose)
+import Data.List ( sort )
import qualified Data.Map as Map
import qualified Data.Set as Set
diff --git a/compiler/GHC/Data/Graph/Ops.hs b/compiler/GHC/Data/Graph/Ops.hs
index b6bce8a97c..c34595eb76 100644
--- a/compiler/GHC/Data/Graph/Ops.hs
+++ b/compiler/GHC/Data/Graph/Ops.hs
@@ -46,7 +46,7 @@ import GHC.Types.Unique
import GHC.Types.Unique.Set
import GHC.Types.Unique.FM
-import Data.List hiding (union)
+import Data.List (mapAccumL, sortBy)
import Data.Maybe
-- | Lookup a node from the graph.
diff --git a/compiler/GHC/Driver/CmdLine.hs b/compiler/GHC/Driver/CmdLine.hs
index 187ca2661a..50d8276278 100644
--- a/compiler/GHC/Driver/CmdLine.hs
+++ b/compiler/GHC/Driver/CmdLine.hs
@@ -36,7 +36,7 @@ import GHC.Types.SrcLoc
import GHC.Utils.Json
import Data.Function
-import Data.List
+import Data.List (sortBy, intercalate, stripPrefix)
import Control.Monad (liftM, ap)
diff --git a/compiler/GHC/Driver/Make.hs b/compiler/GHC/Driver/Make.hs
index 8588675e3c..a6be00188d 100644
--- a/compiler/GHC/Driver/Make.hs
+++ b/compiler/GHC/Driver/Make.hs
@@ -120,7 +120,7 @@ import Control.Monad
import Control.Monad.Trans.Except ( ExceptT(..), runExceptT, throwE )
import qualified Control.Monad.Catch as MC
import Data.IORef
-import Data.List
+import Data.List (nub, sort, sortBy, partition)
import qualified Data.List as List
import Data.Foldable (toList)
import Data.Maybe
diff --git a/compiler/GHC/Driver/MakeFile.hs b/compiler/GHC/Driver/MakeFile.hs
index 8d4db19f92..2328a32ec5 100644
--- a/compiler/GHC/Driver/MakeFile.hs
+++ b/compiler/GHC/Driver/MakeFile.hs
@@ -29,7 +29,7 @@ import GHC.Utils.Outputable
import GHC.Utils.Panic
import GHC.Types.SourceError
import GHC.Types.SrcLoc
-import Data.List
+import Data.List (partition)
import GHC.Data.FastString
import GHC.SysTools.FileCleanup
diff --git a/compiler/GHC/Driver/Session.hs b/compiler/GHC/Driver/Session.hs
index 64c945a7cf..b312747989 100644
--- a/compiler/GHC/Driver/Session.hs
+++ b/compiler/GHC/Driver/Session.hs
@@ -278,7 +278,7 @@ import Control.Monad.Trans.Except
import Data.Ord
import Data.Char
-import Data.List
+import Data.List (intercalate, delete, sortBy)
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Set (Set)
diff --git a/compiler/GHC/Hs/Binds.hs b/compiler/GHC/Hs/Binds.hs
index c345cbe5e9..5316046880 100644
--- a/compiler/GHC/Hs/Binds.hs
+++ b/compiler/GHC/Hs/Binds.hs
@@ -48,7 +48,7 @@ import GHC.Data.BooleanFormula (LBooleanFormula)
import GHC.Utils.Outputable
import GHC.Utils.Panic
-import Data.List hiding ( foldr )
+import Data.List (sortBy)
import Data.Function
{-
diff --git a/compiler/GHC/Hs/Utils.hs b/compiler/GHC/Hs/Utils.hs
index 39ce2c19bd..7219ac381b 100644
--- a/compiler/GHC/Hs/Utils.hs
+++ b/compiler/GHC/Hs/Utils.hs
@@ -147,7 +147,7 @@ import GHC.Utils.Panic
import Data.Either
import Data.Function
-import Data.List
+import Data.List ( partition, deleteBy )
import Data.Proxy
{-
diff --git a/compiler/GHC/HsToCore.hs b/compiler/GHC/HsToCore.hs
index c1292c9275..3622d9f8af 100644
--- a/compiler/GHC/HsToCore.hs
+++ b/compiler/GHC/HsToCore.hs
@@ -86,7 +86,7 @@ import GHC.Unit
import GHC.Unit.Module.ModGuts
import GHC.Unit.Module.ModIface
-import Data.List
+import Data.List (partition)
import Data.IORef
import Control.Monad( when )
import GHC.Driver.Plugins ( LoadedPlugin(..) )
diff --git a/compiler/GHC/HsToCore/Arrows.hs b/compiler/GHC/HsToCore/Arrows.hs
index b667466810..665a665cc4 100644
--- a/compiler/GHC/HsToCore/Arrows.hs
+++ b/compiler/GHC/HsToCore/Arrows.hs
@@ -52,7 +52,7 @@ import GHC.Utils.Panic
import GHC.Types.Var.Set
import GHC.Types.SrcLoc
import GHC.Data.List.SetOps( assocMaybe )
-import Data.List
+import Data.List (mapAccumL)
import GHC.Utils.Misc
import GHC.Types.Unique.DSet
diff --git a/compiler/GHC/HsToCore/Coverage.hs b/compiler/GHC/HsToCore/Coverage.hs
index 09f3165b26..61988c5011 100644
--- a/compiler/GHC/HsToCore/Coverage.hs
+++ b/compiler/GHC/HsToCore/Coverage.hs
@@ -52,7 +52,7 @@ import GHC.Types.CostCentre
import GHC.Types.CostCentre.State
import Control.Monad
-import Data.List
+import Data.List (isSuffixOf, intersperse)
import Data.Array
import Data.Time
import System.Directory
diff --git a/compiler/GHC/HsToCore/Foreign/Decl.hs b/compiler/GHC/HsToCore/Foreign/Decl.hs
index 8348d0a1fa..7f618eb77c 100644
--- a/compiler/GHC/HsToCore/Foreign/Decl.hs
+++ b/compiler/GHC/HsToCore/Foreign/Decl.hs
@@ -62,7 +62,7 @@ import GHC.Driver.Hooks
import GHC.Utils.Encoding
import Data.Maybe
-import Data.List
+import Data.List (unzip4, nub)
{-
Desugaring of @foreign@ declarations is naturally split up into
diff --git a/compiler/GHC/HsToCore/Quote.hs b/compiler/GHC/HsToCore/Quote.hs
index 629b082f6e..4b5b871043 100644
--- a/compiler/GHC/HsToCore/Quote.hs
+++ b/compiler/GHC/HsToCore/Quote.hs
@@ -89,7 +89,7 @@ import Data.Kind (Constraint)
import Data.ByteString ( unpack )
import Control.Monad
-import Data.List
+import Data.List (sort, sortBy)
import Data.Function
import Control.Monad.Trans.Reader
import Control.Monad.Trans.Class
diff --git a/compiler/GHC/HsToCore/Usage.hs b/compiler/GHC/HsToCore/Usage.hs
index 4b644621a6..3a0c27faac 100644
--- a/compiler/GHC/HsToCore/Usage.hs
+++ b/compiler/GHC/HsToCore/Usage.hs
@@ -40,7 +40,7 @@ import GHC.Unit.Module.Deps
import GHC.Data.Maybe
import Control.Monad (filterM)
-import Data.List
+import Data.List (sort, sortBy, nub)
import Data.IORef
import Data.Map (Map)
import qualified Data.Map as Map
diff --git a/compiler/GHC/Iface/Tidy/StaticPtrTable.hs b/compiler/GHC/Iface/Tidy/StaticPtrTable.hs
index c3c032cd9b..0606728900 100644
--- a/compiler/GHC/Iface/Tidy/StaticPtrTable.hs
+++ b/compiler/GHC/Iface/Tidy/StaticPtrTable.hs
@@ -151,7 +151,7 @@ import GHC.Types.TyThing
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.State
-import Data.List
+import Data.List (intercalate)
import Data.Maybe
import GHC.Fingerprint
import qualified GHC.LanguageExtensions as LangExt
diff --git a/compiler/GHC/Linker/MacOS.hs b/compiler/GHC/Linker/MacOS.hs
index 09204575c1..959ef3a217 100644
--- a/compiler/GHC/Linker/MacOS.hs
+++ b/compiler/GHC/Linker/MacOS.hs
@@ -22,7 +22,7 @@ import GHC.Runtime.Interpreter (loadDLL)
import GHC.Utils.Exception
-import Data.List
+import Data.List (isPrefixOf, nub, sort, intersperse, intercalate)
import Control.Monad (join, forM, filterM)
import System.Directory (doesFileExist, getHomeDirectory)
import System.FilePath ((</>), (<.>))
diff --git a/compiler/GHC/Parser/Header.hs b/compiler/GHC/Parser/Header.hs
index 8634d8c495..3b13e1d382 100644
--- a/compiler/GHC/Parser/Header.hs
+++ b/compiler/GHC/Parser/Header.hs
@@ -58,7 +58,7 @@ import GHC.Data.FastString
import Control.Monad
import System.IO
import System.IO.Unsafe
-import Data.List
+import Data.List (partition)
------------------------------------------------------------------------------
diff --git a/compiler/GHC/Parser/Lexer.x b/compiler/GHC/Parser/Lexer.x
index a3f082f4c9..aaae9077b6 100644
--- a/compiler/GHC/Parser/Lexer.x
+++ b/compiler/GHC/Parser/Lexer.x
@@ -76,7 +76,7 @@ import GHC.Prelude
import Control.Monad
import Data.Bits
import Data.Char
-import Data.List
+import Data.List (stripPrefix, isInfixOf)
import Data.Maybe
import Data.Word
diff --git a/compiler/GHC/Parser/PostProcess.hs b/compiler/GHC/Parser/PostProcess.hs
index de94c185ea..aad8a8597d 100644
--- a/compiler/GHC/Parser/PostProcess.hs
+++ b/compiler/GHC/Parser/PostProcess.hs
@@ -135,7 +135,7 @@ import GHC.Data.Maybe
import GHC.Data.Bag
import GHC.Utils.Misc
import GHC.Parser.Annotation
-import Data.List
+import Data.List (findIndex)
import Data.Foldable
import GHC.Driver.Flags ( WarningFlag(..) )
import GHC.Utils.Panic
diff --git a/compiler/GHC/Rename/Expr.hs b/compiler/GHC/Rename/Expr.hs
index aabbbb14de..191349a3b6 100644
--- a/compiler/GHC/Rename/Expr.hs
+++ b/compiler/GHC/Rename/Expr.hs
@@ -53,7 +53,7 @@ import GHC.Types.Name.Set
import GHC.Types.Name.Reader
import GHC.Types.Unique.Set
import GHC.Types.SourceText
-import Data.List
+import Data.List (unzip4, minimumBy)
import Data.Maybe (isJust, isNothing)
import GHC.Utils.Misc
import GHC.Data.List.SetOps ( removeDups )
diff --git a/compiler/GHC/Rename/Fixity.hs b/compiler/GHC/Rename/Fixity.hs
index 9529e2b68e..3d8a3615c1 100644
--- a/compiler/GHC/Rename/Fixity.hs
+++ b/compiler/GHC/Rename/Fixity.hs
@@ -36,7 +36,7 @@ import GHC.Data.Maybe
import GHC.Rename.Unbound
-import Data.List
+import Data.List (groupBy)
import Data.Function ( on )
{-
diff --git a/compiler/GHC/Rename/HsType.hs b/compiler/GHC/Rename/HsType.hs
index 3cc51b651c..2a6f82589d 100644
--- a/compiler/GHC/Rename/HsType.hs
+++ b/compiler/GHC/Rename/HsType.hs
@@ -70,7 +70,7 @@ import GHC.Data.FastString
import GHC.Data.Maybe
import qualified GHC.LanguageExtensions as LangExt
-import Data.List
+import Data.List (sortBy, nubBy, partition)
import qualified Data.List.NonEmpty as NE
import Data.List.NonEmpty (NonEmpty(..))
import Control.Monad
diff --git a/compiler/GHC/Rename/Unbound.hs b/compiler/GHC/Rename/Unbound.hs
index 4422732363..88b23a8725 100644
--- a/compiler/GHC/Rename/Unbound.hs
+++ b/compiler/GHC/Rename/Unbound.hs
@@ -40,7 +40,7 @@ import GHC.Unit.Module
import GHC.Unit.Module.Imported
import GHC.Unit.Home.ModInfo
-import Data.List
+import Data.List (sortBy, partition, nub)
import Data.Function ( on )
{-
diff --git a/compiler/GHC/Rename/Utils.hs b/compiler/GHC/Rename/Utils.hs
index 3a9fd56833..6bced4930d 100644
--- a/compiler/GHC/Rename/Utils.hs
+++ b/compiler/GHC/Rename/Utils.hs
@@ -56,7 +56,7 @@ import GHC.Data.Maybe ( whenIsJust )
import GHC.Driver.Session
import GHC.Data.FastString
import Control.Monad
-import Data.List
+import Data.List (find, sortBy)
import GHC.Settings.Constants ( mAX_TUPLE_SIZE, mAX_CTUPLE_SIZE )
import qualified Data.List.NonEmpty as NE
import qualified GHC.LanguageExtensions as LangExt
diff --git a/compiler/GHC/Runtime/Heap/Inspect.hs b/compiler/GHC/Runtime/Heap/Inspect.hs
index bf6c24d722..4e0372c0b8 100644
--- a/compiler/GHC/Runtime/Heap/Inspect.hs
+++ b/compiler/GHC/Runtime/Heap/Inspect.hs
@@ -67,7 +67,7 @@ import GHC.IO (throwIO)
import Control.Monad
import Data.Maybe
-import Data.List
+import Data.List ((\\))
import GHC.Exts
import qualified Data.Sequence as Seq
import Data.Sequence (viewl, ViewL(..))
diff --git a/compiler/GHC/StgToCmm/Layout.hs b/compiler/GHC/StgToCmm/Layout.hs
index 88e77b3782..e45955d119 100644
--- a/compiler/GHC/StgToCmm/Layout.hs
+++ b/compiler/GHC/StgToCmm/Layout.hs
@@ -60,7 +60,7 @@ import GHC.Platform.Profile
import GHC.Unit
import GHC.Utils.Misc
-import Data.List
+import Data.List (mapAccumL, partition)
import GHC.Utils.Outputable
import GHC.Utils.Panic
import GHC.Data.FastString
diff --git a/compiler/GHC/StgToCmm/Monad.hs b/compiler/GHC/StgToCmm/Monad.hs
index 915b57eae0..6731ad2d9a 100644
--- a/compiler/GHC/StgToCmm/Monad.hs
+++ b/compiler/GHC/StgToCmm/Monad.hs
@@ -89,7 +89,7 @@ import GHC.Utils.Panic
import GHC.Utils.Misc
import Control.Monad
-import Data.List
+import Data.List (mapAccumL)
diff --git a/compiler/GHC/StgToCmm/Utils.hs b/compiler/GHC/StgToCmm/Utils.hs
index 8cca28cc5a..a900de3677 100644
--- a/compiler/GHC/StgToCmm/Utils.hs
+++ b/compiler/GHC/StgToCmm/Utils.hs
@@ -84,7 +84,7 @@ import Data.ByteString (ByteString)
import qualified Data.ByteString.Char8 as BS8
import qualified Data.Map as M
import Data.Char
-import Data.List
+import Data.List (sortBy)
import Data.Ord
diff --git a/compiler/GHC/SysTools/FileCleanup.hs b/compiler/GHC/SysTools/FileCleanup.hs
index b695a72a28..d8791e280c 100644
--- a/compiler/GHC/SysTools/FileCleanup.hs
+++ b/compiler/GHC/SysTools/FileCleanup.hs
@@ -17,7 +17,7 @@ import GHC.Utils.Exception as Exception
import GHC.Driver.Phases
import Control.Monad
-import Data.List
+import Data.List (partition)
import qualified Data.Set as Set
import qualified Data.Map as Map
import Data.IORef
diff --git a/compiler/GHC/SysTools/Info.hs b/compiler/GHC/SysTools/Info.hs
index fe848cbb12..89a81a7b7b 100644
--- a/compiler/GHC/SysTools/Info.hs
+++ b/compiler/GHC/SysTools/Info.hs
@@ -14,7 +14,7 @@ import GHC.Driver.Session
import GHC.Utils.Outputable
import GHC.Utils.Misc
-import Data.List
+import Data.List ( isInfixOf, isPrefixOf )
import Data.IORef
import System.IO
diff --git a/compiler/GHC/SysTools/Tasks.hs b/compiler/GHC/SysTools/Tasks.hs
index 50e25e025a..f71958f276 100644
--- a/compiler/GHC/SysTools/Tasks.hs
+++ b/compiler/GHC/SysTools/Tasks.hs
@@ -25,7 +25,7 @@ import GHC.Utils.Error
import GHC.Utils.Outputable
import GHC.Utils.Misc
-import Data.List
+import Data.List (tails, isPrefixOf)
import System.IO
import System.Process
diff --git a/compiler/GHC/Tc/TyCl.hs b/compiler/GHC/Tc/TyCl.hs
index 680d3d33b7..d434331605 100644
--- a/compiler/GHC/Tc/TyCl.hs
+++ b/compiler/GHC/Tc/TyCl.hs
@@ -96,7 +96,7 @@ import GHC.Utils.Misc
import Control.Monad
import Data.Function ( on )
import Data.Functor.Identity
-import Data.List
+import Data.List (nubBy, partition)
import Data.List.NonEmpty ( NonEmpty(..) )
import qualified Data.Set as Set
import Data.Tuple( swap )
diff --git a/compiler/GHC/Unit/State.hs b/compiler/GHC/Unit/State.hs
index d23bf9bd69..ba6277b182 100644
--- a/compiler/GHC/Unit/State.hs
+++ b/compiler/GHC/Unit/State.hs
@@ -107,7 +107,7 @@ import System.FilePath as FilePath
import Control.Monad
import Data.Graph (stronglyConnComp, SCC(..))
import Data.Char ( toUpper )
-import Data.List as List
+import Data.List ( intersperse, partition, sortBy, isSuffixOf )
import Data.Map (Map)
import Data.Set (Set)
import Data.Monoid (First(..))
diff --git a/compiler/GHC/Utils/Error.hs b/compiler/GHC/Utils/Error.hs
index 9ecbb1465c..f371b17953 100644
--- a/compiler/GHC/Utils/Error.hs
+++ b/compiler/GHC/Utils/Error.hs
@@ -77,7 +77,7 @@ import GHC.Types.SrcLoc as SrcLoc
import System.Directory
import System.Exit ( ExitCode(..), exitWith )
import System.FilePath ( takeDirectory, (</>) )
-import Data.List
+import Data.List ( sortBy, stripPrefix )
import qualified Data.Set as Set
import Data.IORef
import Data.Maybe ( fromMaybe )
diff --git a/compiler/GHC/Utils/Misc.hs b/compiler/GHC/Utils/Misc.hs
index 07d4b721ff..d0989de39e 100644
--- a/compiler/GHC/Utils/Misc.hs
+++ b/compiler/GHC/Utils/Misc.hs
@@ -36,7 +36,7 @@ module GHC.Utils.Misc (
dropWhileEndLE, spanEnd, last2, lastMaybe,
- foldl1', foldl2, count, countWhile, all2,
+ List.foldl1', foldl2, count, countWhile, all2,
lengthExceeds, lengthIs, lengthIsNot,
lengthAtLeast, lengthAtMost, lengthLessThan,
@@ -140,7 +140,7 @@ import GHC.Utils.Exception
import GHC.Utils.Panic.Plain
import Data.Data
-import Data.List hiding (group)
+import qualified Data.List as List
import Data.List.NonEmpty ( NonEmpty(..) )
import GHC.Exts
@@ -314,7 +314,7 @@ zipWith4Equal :: String -> (a->b->c->d->e) -> [a]->[b]->[c]->[d]->[e]
zipEqual _ = zip
zipWithEqual _ = zipWith
zipWith3Equal _ = zipWith3
-zipWith4Equal _ = zipWith4
+zipWith4Equal _ = List.zipWith4
#else
zipEqual _ [] [] = []
zipEqual msg (a:as) (b:bs) = (a,b) : zipEqual msg as bs
@@ -819,7 +819,7 @@ spanEnd p l = go l [] [] l
-- | Get the last two elements in a list. Partial!
{-# INLINE last2 #-}
last2 :: [a] -> (a,a)
-last2 = foldl' (\(_,x2) x -> (x2,x)) (partialError,partialError)
+last2 = List.foldl' (\(_,x2) x -> (x2,x)) (partialError,partialError)
where
partialError = panic "last2 - list length less than two"
@@ -948,7 +948,7 @@ restrictedDamerauLevenshteinDistance'
restrictedDamerauLevenshteinDistance' _bv_dummy m n str1 str2
| [] <- str1 = n
| otherwise = extractAnswer $
- foldl' (restrictedDamerauLevenshteinDistanceWorker
+ List.foldl' (restrictedDamerauLevenshteinDistanceWorker
(matchVectors str1) top_bit_mask vector_mask)
(0, 0, m_ones, 0, m) str2
where
@@ -987,7 +987,7 @@ sizedComplement :: Bits bv => bv -> bv -> bv
sizedComplement vector_mask vect = vector_mask `xor` vect
matchVectors :: (Bits bv, Num bv) => String -> IM.IntMap bv
-matchVectors = snd . foldl' go (0 :: Int, IM.empty)
+matchVectors = snd . List.foldl' go (0 :: Int, IM.empty)
where
go (ix, im) char = let ix' = ix + 1
im' = IM.insertWith (.|.) (ord char) (2 ^ ix) im
@@ -1020,7 +1020,7 @@ fuzzyMatch key vals = fuzzyLookup key [(v,v) | v <- vals]
-- returning a small number of ranked results
fuzzyLookup :: String -> [(String,a)] -> [a]
fuzzyLookup user_entered possibilites
- = map fst $ take mAX_RESULTS $ sortBy (comparing snd)
+ = map fst $ take mAX_RESULTS $ List.sortBy (comparing snd)
[ (poss_val, distance) | (poss_str, poss_val) <- possibilites
, let distance = restrictedDamerauLevenshteinDistance
poss_str user_entered
@@ -1254,7 +1254,7 @@ readHexRational__ ('0' : x : rest)
(ds,"") | not (null ds) -> Just (steps 10 0 ds)
_ -> Nothing
- steps base n ds = foldl' (step base) n ds
+ steps base n ds = List.foldl' (step base) n ds
step base n d = base * n + fromIntegral (digitToInt d)
span' _ xs@[] = (xs, xs)