summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-01-03 21:51:11 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-02-08 10:17:55 -0500
commitaede171a59f9b7b8022548c385a1cb8c4589f905 (patch)
tree70c3a4e1518592f9392893ea3ad64a25bae0f467 /testsuite
parentc2e301aeeae353a64be43e5fa9e7d464797d5648 (diff)
downloadhaskell-aede171a59f9b7b8022548c385a1cb8c4589f905.tar.gz
testsuite: Fix -Wcompat-unqualified-imports issues
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/annotations/should_run/annrun01.hs2
-rw-r--r--testsuite/tests/codeGen/should_run/T1852.hs1
-rw-r--r--testsuite/tests/codeGen/should_run/cgrun047.hs2
-rw-r--r--testsuite/tests/codeGen/should_run/compareByteArrays.hs2
-rw-r--r--testsuite/tests/concurrent/should_run/conc019.hs1
-rw-r--r--testsuite/tests/concurrent/should_run/conc070.hs1
-rw-r--r--testsuite/tests/driver/T4437.hs2
-rw-r--r--testsuite/tests/ffi/should_run/ffi016.hs1
-rw-r--r--testsuite/tests/ghc-api/T12099.hs2
-rw-r--r--testsuite/tests/ghc-api/annotations-literals/literals.hs2
-rw-r--r--testsuite/tests/ghc-api/annotations-literals/parsed.hs2
-rw-r--r--testsuite/tests/ghc-api/annotations/Test10313.hs2
-rw-r--r--testsuite/tests/ghc-api/annotations/annotations.hs2
-rw-r--r--testsuite/tests/ghc-api/annotations/comments.hs2
-rw-r--r--testsuite/tests/ghc-api/annotations/listcomps.hs2
-rw-r--r--testsuite/tests/ghc-api/annotations/parseTree.hs2
-rw-r--r--testsuite/tests/ghc-api/annotations/stringSource.hs2
-rw-r--r--testsuite/tests/ghc-api/annotations/t11430.hs2
-rw-r--r--testsuite/tests/ghc-api/downsweep/OldModLocation.hs2
-rw-r--r--testsuite/tests/ghc-api/downsweep/PartialDownsweep.hs2
-rw-r--r--testsuite/tests/ghc-api/target-contents/TargetContents.hs2
-rw-r--r--testsuite/tests/ghc-e/should_run/Makefile2
-rw-r--r--testsuite/tests/ghci/prog009/ghci.prog009.script2
-rw-r--r--testsuite/tests/ghci/prog018/B.hs2
-rw-r--r--testsuite/tests/ghci/prog018/prog018.stdout6
-rw-r--r--testsuite/tests/ghci/scripts/T14828.script1
-rw-r--r--testsuite/tests/ghci/scripts/T8579.script2
-rw-r--r--testsuite/tests/ghci/scripts/T9293.stdout4
-rw-r--r--testsuite/tests/ghci/scripts/T9293.stdout-mingw324
-rw-r--r--testsuite/tests/ghci/scripts/ghci004.hs2
-rw-r--r--testsuite/tests/ghci/scripts/ghci024.stdout1
-rw-r--r--testsuite/tests/ghci/scripts/ghci024.stdout-mingw321
-rw-r--r--testsuite/tests/ghci/scripts/ghci036.script3
-rw-r--r--testsuite/tests/ghci/scripts/ghci038.hs2
-rw-r--r--testsuite/tests/ghci/scripts/ghci038.script6
-rw-r--r--testsuite/tests/ghci/scripts/ghci038.stdout6
-rw-r--r--testsuite/tests/ghci/scripts/ghci057.stdout4
-rw-r--r--testsuite/tests/ghci/scripts/ghci057.stdout-mingw324
-rw-r--r--testsuite/tests/ghci/should_run/ghcirun002.hs2
-rw-r--r--testsuite/tests/module/Mod137_A.hs1
-rw-r--r--testsuite/tests/module/Mod138_A.hs1
-rw-r--r--testsuite/tests/module/Mod141_A.hs1
-rw-r--r--testsuite/tests/module/mod154.hs2
-rw-r--r--testsuite/tests/numeric/should_run/CarryOverflow.hs2
-rw-r--r--testsuite/tests/numeric/should_run/T8726.hs2
-rw-r--r--testsuite/tests/overloadedlists/should_run/overloadedlistsrun05.hs10
-rw-r--r--testsuite/tests/parser/should_compile/mc16.hs2
-rw-r--r--testsuite/tests/parser/should_compile/read016.hs4
-rw-r--r--testsuite/tests/parser/should_compile/read062.hs2
-rw-r--r--testsuite/tests/parser/should_run/CountParserDeps.hs1
-rw-r--r--testsuite/tests/perf/join_points/join002.hs2
-rw-r--r--testsuite/tests/perf/join_points/join003.hs2
-rw-r--r--testsuite/tests/perf/should_run/T15263.hs14
-rw-r--r--testsuite/tests/perf/should_run/T15426.hs12
-rw-r--r--testsuite/tests/perf/should_run/T5949.hs2
-rw-r--r--testsuite/tests/perf/space_leaks/space_leak_001.hs2
-rw-r--r--testsuite/tests/plugins/FrontendPlugin.hs2
-rw-r--r--testsuite/tests/primops/should_run/ArithInt16.hs2
-rw-r--r--testsuite/tests/primops/should_run/ArithInt8.hs2
-rw-r--r--testsuite/tests/primops/should_run/ArithWord16.hs2
-rw-r--r--testsuite/tests/primops/should_run/ArithWord8.hs2
-rw-r--r--testsuite/tests/primops/should_run/CmpInt16.hs2
-rw-r--r--testsuite/tests/primops/should_run/CmpInt8.hs2
-rw-r--r--testsuite/tests/primops/should_run/CmpWord16.hs2
-rw-r--r--testsuite/tests/primops/should_run/CmpWord8.hs2
-rw-r--r--testsuite/tests/profiling/should_run/T11627a.hs2
-rw-r--r--testsuite/tests/quasiquotation/T7918.hs2
-rw-r--r--testsuite/tests/rebindable/DoRestrictedM.hs2
-rw-r--r--testsuite/tests/rename/prog001/rn037.hs2
-rw-r--r--testsuite/tests/rename/should_compile/T1972.hs4
-rw-r--r--testsuite/tests/rename/should_compile/T1972.stderr2
-rw-r--r--testsuite/tests/rename/should_compile/T4478.hs1
-rw-r--r--testsuite/tests/rename/should_compile/T7167.hs1
-rw-r--r--testsuite/tests/rename/should_compile/T7167.stderr2
-rw-r--r--testsuite/tests/rename/should_compile/rn025.hs2
-rw-r--r--testsuite/tests/rename/should_compile/rn027.hs2
-rw-r--r--testsuite/tests/rename/should_compile/rn031.hs2
-rw-r--r--testsuite/tests/rename/should_compile/rn037.hs2
-rw-r--r--testsuite/tests/rename/should_compile/rn037.stderr6
-rw-r--r--testsuite/tests/rename/should_compile/rn060.hs1
-rw-r--r--testsuite/tests/rts/T10728.hs2
-rw-r--r--testsuite/tests/rts/T2047.hs2
-rw-r--r--testsuite/tests/rts/alloccounter1.hs2
-rw-r--r--testsuite/tests/safeHaskell/unsafeLibs/GoodImport03.hs2
-rw-r--r--testsuite/tests/simplCore/should_compile/T5342.hs2
-rw-r--r--testsuite/tests/th/TH_RichKinds2.hs2
-rw-r--r--testsuite/tests/typecheck/should_run/tcrun021.hs2
-rw-r--r--testsuite/tests/warnings/should_compile/T11077.hs2
-rw-r--r--testsuite/tests/warnings/should_compile/T11077.stderr2
89 files changed, 128 insertions, 95 deletions
diff --git a/testsuite/tests/annotations/should_run/annrun01.hs b/testsuite/tests/annotations/should_run/annrun01.hs
index 9030a39c60..f8c0ca5e84 100644
--- a/testsuite/tests/annotations/should_run/annrun01.hs
+++ b/testsuite/tests/annotations/should_run/annrun01.hs
@@ -14,7 +14,7 @@ import Config
import Annrun01_Help
import qualified Language.Haskell.TH as TH
-import Data.List
+import Data.List (sortBy)
import Data.Function
main :: IO ()
diff --git a/testsuite/tests/codeGen/should_run/T1852.hs b/testsuite/tests/codeGen/should_run/T1852.hs
index f5d9370741..2564f5f1f9 100644
--- a/testsuite/tests/codeGen/should_run/T1852.hs
+++ b/testsuite/tests/codeGen/should_run/T1852.hs
@@ -1,5 +1,4 @@
{-# OPTIONS_GHC -funbox-strict-fields #-}
-import Data.List
data Vec4 = Vec4 !Float !Float !Float !Float
diff --git a/testsuite/tests/codeGen/should_run/cgrun047.hs b/testsuite/tests/codeGen/should_run/cgrun047.hs
index 8880814e78..f361d2e9d4 100644
--- a/testsuite/tests/codeGen/should_run/cgrun047.hs
+++ b/testsuite/tests/codeGen/should_run/cgrun047.hs
@@ -6,7 +6,7 @@ module Main where
-- specified. Through a process of elimination I've managed to reproduce
-- the problemin the following (much simpler) piece of code:
-import Data.List
+import Data.List (groupBy)
test es =
concat (groupBy eq (zip [0..(length es) - 1] es))
diff --git a/testsuite/tests/codeGen/should_run/compareByteArrays.hs b/testsuite/tests/codeGen/should_run/compareByteArrays.hs
index e08328d27d..5bd0e58588 100644
--- a/testsuite/tests/codeGen/should_run/compareByteArrays.hs
+++ b/testsuite/tests/codeGen/should_run/compareByteArrays.hs
@@ -8,7 +8,7 @@ module Main (main) where
import Control.Monad
import Control.Monad.ST
-import Data.List
+import Data.List (sort, intercalate)
import GHC.Exts (Int (..))
import GHC.Prim
import GHC.ST (ST (ST))
diff --git a/testsuite/tests/concurrent/should_run/conc019.hs b/testsuite/tests/concurrent/should_run/conc019.hs
index 1ac5731479..9804657aab 100644
--- a/testsuite/tests/concurrent/should_run/conc019.hs
+++ b/testsuite/tests/concurrent/should_run/conc019.hs
@@ -1,6 +1,5 @@
import Control.Concurrent
import Control.Exception
-import Data.List
import System.Mem
-- !!! test that a child thread waiting on its own MVar will get killed by
diff --git a/testsuite/tests/concurrent/should_run/conc070.hs b/testsuite/tests/concurrent/should_run/conc070.hs
index 71eb415427..bd08ba475a 100644
--- a/testsuite/tests/concurrent/should_run/conc070.hs
+++ b/testsuite/tests/concurrent/should_run/conc070.hs
@@ -1,6 +1,5 @@
import Control.Concurrent
import GHC.Conc
-import Data.List
import Data.Maybe
main = do
diff --git a/testsuite/tests/driver/T4437.hs b/testsuite/tests/driver/T4437.hs
index 8bbfcb5670..5187a7bf74 100644
--- a/testsuite/tests/driver/T4437.hs
+++ b/testsuite/tests/driver/T4437.hs
@@ -7,7 +7,7 @@
module Main (main) where
import Control.Monad
-import Data.List
+import Data.List ( (\\) )
import DynFlags
import Language.Haskell.Extension
diff --git a/testsuite/tests/ffi/should_run/ffi016.hs b/testsuite/tests/ffi/should_run/ffi016.hs
index 0be6f31d7a..4fb9a4fff1 100644
--- a/testsuite/tests/ffi/should_run/ffi016.hs
+++ b/testsuite/tests/ffi/should_run/ffi016.hs
@@ -5,7 +5,6 @@ import Foreign.Concurrent as Conc
import Foreign
import GHC.TopHandler
import Control.Concurrent
-import Data.List
import System.Mem
-- This finalizer calls back into Haskell, so we can't use
diff --git a/testsuite/tests/ghc-api/T12099.hs b/testsuite/tests/ghc-api/T12099.hs
index d5d5d54445..ba254cfd13 100644
--- a/testsuite/tests/ghc-api/T12099.hs
+++ b/testsuite/tests/ghc-api/T12099.hs
@@ -3,7 +3,7 @@ module Main where
import DynFlags
import Control.Monad
-import Data.List
+import Data.List (isPrefixOf)
-- Verify bogus flags aren't printed on flagsForCompletion and
-- allNonDeprecatedFlags:
diff --git a/testsuite/tests/ghc-api/annotations-literals/literals.hs b/testsuite/tests/ghc-api/annotations-literals/literals.hs
index df0f1edf50..9243eba0b7 100644
--- a/testsuite/tests/ghc-api/annotations-literals/literals.hs
+++ b/testsuite/tests/ghc-api/annotations-literals/literals.hs
@@ -4,7 +4,7 @@ module Main where
-- import Data.Generics
import Data.Data
-import Data.List
+import Data.List (intercalate)
import System.IO
import GHC
import DynFlags
diff --git a/testsuite/tests/ghc-api/annotations-literals/parsed.hs b/testsuite/tests/ghc-api/annotations-literals/parsed.hs
index defa26569b..cba17fe4c3 100644
--- a/testsuite/tests/ghc-api/annotations-literals/parsed.hs
+++ b/testsuite/tests/ghc-api/annotations-literals/parsed.hs
@@ -5,7 +5,7 @@ module Main where
import BasicTypes
import Data.Data
-import Data.List
+import Data.List (intercalate)
import System.IO
import GHC
import DynFlags
diff --git a/testsuite/tests/ghc-api/annotations/Test10313.hs b/testsuite/tests/ghc-api/annotations/Test10313.hs
index 5faa00649f..130e84b0e3 100644
--- a/testsuite/tests/ghc-api/annotations/Test10313.hs
+++ b/testsuite/tests/ghc-api/annotations/Test10313.hs
@@ -4,7 +4,7 @@
module Test10313 where
-import "b\x61se" Data.List
+import "b\x61se" Data.List ()
{-# WARNING Logic
, solverCheckAndGetModel
diff --git a/testsuite/tests/ghc-api/annotations/annotations.hs b/testsuite/tests/ghc-api/annotations/annotations.hs
index fe952601d2..9ea0c0c004 100644
--- a/testsuite/tests/ghc-api/annotations/annotations.hs
+++ b/testsuite/tests/ghc-api/annotations/annotations.hs
@@ -6,7 +6,7 @@ module Main where
-- import Data.Generics
import Data.Data
-import Data.List
+import Data.List (intercalate)
import System.IO
import GHC
import DynFlags
diff --git a/testsuite/tests/ghc-api/annotations/comments.hs b/testsuite/tests/ghc-api/annotations/comments.hs
index 1fb1d41903..585e4f91eb 100644
--- a/testsuite/tests/ghc-api/annotations/comments.hs
+++ b/testsuite/tests/ghc-api/annotations/comments.hs
@@ -6,7 +6,7 @@ module Main where
-- import Data.Generics
import Data.Data
-import Data.List
+import Data.List (intercalate)
import System.IO
import GHC
import DynFlags
diff --git a/testsuite/tests/ghc-api/annotations/listcomps.hs b/testsuite/tests/ghc-api/annotations/listcomps.hs
index dc440e9d65..7274e981cc 100644
--- a/testsuite/tests/ghc-api/annotations/listcomps.hs
+++ b/testsuite/tests/ghc-api/annotations/listcomps.hs
@@ -6,7 +6,7 @@ module Main where
-- import Data.Generics
import Data.Data
-import Data.List
+import Data.List (intercalate)
import System.IO
import GHC
import BasicTypes
diff --git a/testsuite/tests/ghc-api/annotations/parseTree.hs b/testsuite/tests/ghc-api/annotations/parseTree.hs
index badf59150f..e1c75c40e2 100644
--- a/testsuite/tests/ghc-api/annotations/parseTree.hs
+++ b/testsuite/tests/ghc-api/annotations/parseTree.hs
@@ -6,7 +6,7 @@ module Main where
-- import Data.Generics
import Data.Data
-import Data.List
+import Data.List (intercalate)
import System.IO
import GHC
import BasicTypes
diff --git a/testsuite/tests/ghc-api/annotations/stringSource.hs b/testsuite/tests/ghc-api/annotations/stringSource.hs
index 3d053a3d7c..21cc867598 100644
--- a/testsuite/tests/ghc-api/annotations/stringSource.hs
+++ b/testsuite/tests/ghc-api/annotations/stringSource.hs
@@ -8,7 +8,7 @@ module Main where
-- import Data.Generics
import Data.Data
-import Data.List
+import Data.List (intercalate)
import System.IO
import GHC
import BasicTypes
diff --git a/testsuite/tests/ghc-api/annotations/t11430.hs b/testsuite/tests/ghc-api/annotations/t11430.hs
index 4b60097a69..9de2100a01 100644
--- a/testsuite/tests/ghc-api/annotations/t11430.hs
+++ b/testsuite/tests/ghc-api/annotations/t11430.hs
@@ -8,7 +8,7 @@ module Main where
-- import Data.Generics
import Data.Data hiding (Fixity)
-import Data.List
+import Data.List (intercalate)
import System.IO
import GHC
import BasicTypes
diff --git a/testsuite/tests/ghc-api/downsweep/OldModLocation.hs b/testsuite/tests/ghc-api/downsweep/OldModLocation.hs
index a96bd42d24..96bd4deb58 100644
--- a/testsuite/tests/ghc-api/downsweep/OldModLocation.hs
+++ b/testsuite/tests/ghc-api/downsweep/OldModLocation.hs
@@ -6,7 +6,7 @@ import DynFlags
import Finder
import Control.Monad.IO.Class (liftIO)
-import Data.List
+import Data.List (sort, stripPrefix)
import Data.Either
import System.Environment
diff --git a/testsuite/tests/ghc-api/downsweep/PartialDownsweep.hs b/testsuite/tests/ghc-api/downsweep/PartialDownsweep.hs
index 754236a540..86e6b9d650 100644
--- a/testsuite/tests/ghc-api/downsweep/PartialDownsweep.hs
+++ b/testsuite/tests/ghc-api/downsweep/PartialDownsweep.hs
@@ -14,7 +14,7 @@ import Control.Monad
import Control.Monad.IO.Class (liftIO)
import Control.Exception
import Data.IORef
-import Data.List
+import Data.List (sort, find, stripPrefix, isPrefixOf, isSuffixOf)
import Data.Either
import System.Environment
diff --git a/testsuite/tests/ghc-api/target-contents/TargetContents.hs b/testsuite/tests/ghc-api/target-contents/TargetContents.hs
index eaa30697f8..33e73e8991 100644
--- a/testsuite/tests/ghc-api/target-contents/TargetContents.hs
+++ b/testsuite/tests/ghc-api/target-contents/TargetContents.hs
@@ -7,7 +7,7 @@ import GHC
import Control.Monad
import Control.Monad.IO.Class (liftIO)
-import Data.List
+import Data.List (intercalate)
import Data.Maybe
import Data.Time.Calendar
import Data.Time.Clock
diff --git a/testsuite/tests/ghc-e/should_run/Makefile b/testsuite/tests/ghc-e/should_run/Makefile
index 29b4e9fef6..3a5fddc2da 100644
--- a/testsuite/tests/ghc-e/should_run/Makefile
+++ b/testsuite/tests/ghc-e/should_run/Makefile
@@ -37,7 +37,7 @@ T9086:
'$(TEST_HC)' $(TEST_HC_OPTS) -ignore-dot-ghci -e ":main" T9086.hs
T9905:
- '$(TEST_HC)' $(TEST_HC_OPTS) -ignore-dot-ghci -e "import Data.List" -e "sort [2,1]"
+ '$(TEST_HC)' $(TEST_HC_OPTS) -ignore-dot-ghci -e "import Data.List (sort)" -e "sort [2,1]"
T9905b:
'$(TEST_HC)' $(TEST_HC_OPTS) -ignore-dot-ghci -e "import qualified Data.List as L" -e "L.sort [2,1]"
diff --git a/testsuite/tests/ghci/prog009/ghci.prog009.script b/testsuite/tests/ghci/prog009/ghci.prog009.script
index 6005727d44..713735645b 100644
--- a/testsuite/tests/ghci/prog009/ghci.prog009.script
+++ b/testsuite/tests/ghci/prog009/ghci.prog009.script
@@ -1,5 +1,5 @@
:! cp A1.hs A.hs
-import Data.List
+import Data.List (nub)
:load A
-- Data.List should still be in scope:
:t nub
diff --git a/testsuite/tests/ghci/prog018/B.hs b/testsuite/tests/ghci/prog018/B.hs
index ebfdd6d733..fc3a615240 100644
--- a/testsuite/tests/ghci/prog018/B.hs
+++ b/testsuite/tests/ghci/prog018/B.hs
@@ -4,4 +4,4 @@ module B
) where
import A
-import Data.List
+import Data.Tuple
diff --git a/testsuite/tests/ghci/prog018/prog018.stdout b/testsuite/tests/ghci/prog018/prog018.stdout
index daa722e436..ba8594dcf5 100644
--- a/testsuite/tests/ghci/prog018/prog018.stdout
+++ b/testsuite/tests/ghci/prog018/prog018.stdout
@@ -11,9 +11,9 @@ A.hs:8:15: warning: [-Wunused-matches (in -Wextra)]
Defined but not used: ‘x’
B.hs:7:1: warning: [-Wunused-imports (in -Wextra)]
- The import of ‘Data.List’ is redundant
- except perhaps to import instances from ‘Data.List’
- To import instances alone, use: import Data.List()
+ The import of ‘Data.Tuple’ is redundant
+ except perhaps to import instances from ‘Data.Tuple’
+ To import instances alone, use: import Data.Tuple()
C.hs:6:7: error: Variable not in scope: variableNotInScope :: ()
Failed, two modules loaded.
diff --git a/testsuite/tests/ghci/scripts/T14828.script b/testsuite/tests/ghci/scripts/T14828.script
index 59d616abde..d8eea69b7c 100644
--- a/testsuite/tests/ghci/scripts/T14828.script
+++ b/testsuite/tests/ghci/scripts/T14828.script
@@ -14,6 +14,7 @@
:p mempty
:p mappend
+:set -Wno-compat-unqualified-imports
:m + Data.List
:p foldl'
diff --git a/testsuite/tests/ghci/scripts/T8579.script b/testsuite/tests/ghci/scripts/T8579.script
index 64aadf056f..29f1b5b6b3 100644
--- a/testsuite/tests/ghci/scripts/T8579.script
+++ b/testsuite/tests/ghci/scripts/T8579.script
@@ -1,5 +1,5 @@
data A = X
data A = Y
:i A
-:m Data.List
+:m Data.Tuple
:i A
diff --git a/testsuite/tests/ghci/scripts/T9293.stdout b/testsuite/tests/ghci/scripts/T9293.stdout
index 87b950654d..57820fc4ed 100644
--- a/testsuite/tests/ghci/scripts/T9293.stdout
+++ b/testsuite/tests/ghci/scripts/T9293.stdout
@@ -17,6 +17,7 @@ warning settings:
-Wsemigroup
-Wnoncanonical-monoid-instances
-Wstar-is-type
+ -Wcompat-unqualified-imports
Should fail, GADTs is not enabled
options currently set: none.
base language is: Haskell2010
@@ -40,6 +41,7 @@ warning settings:
-Wsemigroup
-Wnoncanonical-monoid-instances
-Wstar-is-type
+ -Wcompat-unqualified-imports
Should work, GADTs is in force from :set
options currently set: none.
base language is: Haskell2010
@@ -62,6 +64,7 @@ warning settings:
-Wsemigroup
-Wnoncanonical-monoid-instances
-Wstar-is-type
+ -Wcompat-unqualified-imports
Should fail, GADTs is now disabled
base language is: Haskell2010
with the following modifiers:
@@ -86,5 +89,6 @@ warning settings:
-Wsemigroup
-Wnoncanonical-monoid-instances
-Wstar-is-type
+ -Wcompat-unqualified-imports
Should fail, GADTs is only enabled at the prompt
C :: T Int
diff --git a/testsuite/tests/ghci/scripts/T9293.stdout-mingw32 b/testsuite/tests/ghci/scripts/T9293.stdout-mingw32
index eb3e225419..0873022137 100644
--- a/testsuite/tests/ghci/scripts/T9293.stdout-mingw32
+++ b/testsuite/tests/ghci/scripts/T9293.stdout-mingw32
@@ -16,6 +16,7 @@ warning settings:
-Wsemigroup
-Wnoncanonical-monoid-instances
-Wstar-is-type
+ -Wcompat-unqualified-imports
Should fail, GADTs is not enabled
options currently set: none.
base language is: Haskell2010
@@ -38,6 +39,7 @@ warning settings:
-Wsemigroup
-Wnoncanonical-monoid-instances
-Wstar-is-type
+ -Wcompat-unqualified-imports
Should work, GADTs is in force from :set
options currently set: none.
base language is: Haskell2010
@@ -59,6 +61,7 @@ warning settings:
-Wsemigroup
-Wnoncanonical-monoid-instances
-Wstar-is-type
+ -Wcompat-unqualified-imports
Should fail, GADTs is now disabled
base language is: Haskell2010
with the following modifiers:
@@ -82,5 +85,6 @@ warning settings:
-Wsemigroup
-Wnoncanonical-monoid-instances
-Wstar-is-type
+ -Wcompat-unqualified-imports
Should fail, GADTs is only enabled at the prompt
C :: T Int
diff --git a/testsuite/tests/ghci/scripts/ghci004.hs b/testsuite/tests/ghci/scripts/ghci004.hs
index 6406a11565..d7b34e50f3 100644
--- a/testsuite/tests/ghci/scripts/ghci004.hs
+++ b/testsuite/tests/ghci/scripts/ghci004.hs
@@ -1,2 +1,2 @@
-import Data.List
+import Data.List (sort)
main = print (sort [100,99..1])
diff --git a/testsuite/tests/ghci/scripts/ghci024.stdout b/testsuite/tests/ghci/scripts/ghci024.stdout
index 138da30075..e4e664ada9 100644
--- a/testsuite/tests/ghci/scripts/ghci024.stdout
+++ b/testsuite/tests/ghci/scripts/ghci024.stdout
@@ -18,6 +18,7 @@ warning settings:
-Wsemigroup
-Wnoncanonical-monoid-instances
-Wstar-is-type
+ -Wcompat-unqualified-imports
~~~~~~~~~~ Testing :set -a
options currently set: none.
base language is: Haskell2010
diff --git a/testsuite/tests/ghci/scripts/ghci024.stdout-mingw32 b/testsuite/tests/ghci/scripts/ghci024.stdout-mingw32
index 8083bc92b0..358f9374a4 100644
--- a/testsuite/tests/ghci/scripts/ghci024.stdout-mingw32
+++ b/testsuite/tests/ghci/scripts/ghci024.stdout-mingw32
@@ -17,6 +17,7 @@ warning settings:
-Wsemigroup
-Wnoncanonical-monoid-instances
-Wstar-is-type
+ -Wcompat-unqualified-imports
~~~~~~~~~~ Testing :set -a
options currently set: none.
base language is: Haskell2010
diff --git a/testsuite/tests/ghci/scripts/ghci036.script b/testsuite/tests/ghci/scripts/ghci036.script
index 3615e07252..105f147b54 100644
--- a/testsuite/tests/ghci/scripts/ghci036.script
+++ b/testsuite/tests/ghci/scripts/ghci036.script
@@ -1,3 +1,4 @@
+:set -Wno-compat-unqualified-imports
import Data.List (nub)
:t nubBy
import Data.List (nubBy)
@@ -16,4 +17,4 @@ import qualified Data.List as L
:m -Data.List
:t L.nub
:m Prelude
-:t nub \ No newline at end of file
+:t nub
diff --git a/testsuite/tests/ghci/scripts/ghci038.hs b/testsuite/tests/ghci/scripts/ghci038.hs
index 62b3318e25..4e416183eb 100644
--- a/testsuite/tests/ghci/scripts/ghci038.hs
+++ b/testsuite/tests/ghci/scripts/ghci038.hs
@@ -1,3 +1,3 @@
module Foo where
-import Data.List
+import Data.List (map)
x = map
diff --git a/testsuite/tests/ghci/scripts/ghci038.script b/testsuite/tests/ghci/scripts/ghci038.script
index c534cfc5b2..db65b5442f 100644
--- a/testsuite/tests/ghci/scripts/ghci038.script
+++ b/testsuite/tests/ghci/scripts/ghci038.script
@@ -38,9 +38,9 @@ import Prelude ()
import Prelude
:show imports
-import Data.List hiding (nub)
+import Data.Tuple hiding (swap)
:show imports
-import qualified Data.List as Q
+import qualified Data.Tuple as Q
:show imports
-:m -Data.List
+:m -Data.Tuple
:show imports
diff --git a/testsuite/tests/ghci/scripts/ghci038.stdout b/testsuite/tests/ghci/scripts/ghci038.stdout
index bd13690cca..8a54abb760 100644
--- a/testsuite/tests/ghci/scripts/ghci038.stdout
+++ b/testsuite/tests/ghci/scripts/ghci038.stdout
@@ -22,10 +22,10 @@ x :: (a -> b) -> [a] -> [b]
import Prelude
:module +*Foo
import Prelude
-import Data.List hiding ( nub )
+import Data.Tuple hiding ( swap )
:module +*Foo
import Prelude
-import Data.List hiding ( nub )
-import qualified Data.List as Q
+import Data.Tuple hiding ( swap )
+import qualified Data.Tuple as Q
:module +*Foo
import Prelude
diff --git a/testsuite/tests/ghci/scripts/ghci057.stdout b/testsuite/tests/ghci/scripts/ghci057.stdout
index 87b950654d..57820fc4ed 100644
--- a/testsuite/tests/ghci/scripts/ghci057.stdout
+++ b/testsuite/tests/ghci/scripts/ghci057.stdout
@@ -17,6 +17,7 @@ warning settings:
-Wsemigroup
-Wnoncanonical-monoid-instances
-Wstar-is-type
+ -Wcompat-unqualified-imports
Should fail, GADTs is not enabled
options currently set: none.
base language is: Haskell2010
@@ -40,6 +41,7 @@ warning settings:
-Wsemigroup
-Wnoncanonical-monoid-instances
-Wstar-is-type
+ -Wcompat-unqualified-imports
Should work, GADTs is in force from :set
options currently set: none.
base language is: Haskell2010
@@ -62,6 +64,7 @@ warning settings:
-Wsemigroup
-Wnoncanonical-monoid-instances
-Wstar-is-type
+ -Wcompat-unqualified-imports
Should fail, GADTs is now disabled
base language is: Haskell2010
with the following modifiers:
@@ -86,5 +89,6 @@ warning settings:
-Wsemigroup
-Wnoncanonical-monoid-instances
-Wstar-is-type
+ -Wcompat-unqualified-imports
Should fail, GADTs is only enabled at the prompt
C :: T Int
diff --git a/testsuite/tests/ghci/scripts/ghci057.stdout-mingw32 b/testsuite/tests/ghci/scripts/ghci057.stdout-mingw32
index eb3e225419..0873022137 100644
--- a/testsuite/tests/ghci/scripts/ghci057.stdout-mingw32
+++ b/testsuite/tests/ghci/scripts/ghci057.stdout-mingw32
@@ -16,6 +16,7 @@ warning settings:
-Wsemigroup
-Wnoncanonical-monoid-instances
-Wstar-is-type
+ -Wcompat-unqualified-imports
Should fail, GADTs is not enabled
options currently set: none.
base language is: Haskell2010
@@ -38,6 +39,7 @@ warning settings:
-Wsemigroup
-Wnoncanonical-monoid-instances
-Wstar-is-type
+ -Wcompat-unqualified-imports
Should work, GADTs is in force from :set
options currently set: none.
base language is: Haskell2010
@@ -59,6 +61,7 @@ warning settings:
-Wsemigroup
-Wnoncanonical-monoid-instances
-Wstar-is-type
+ -Wcompat-unqualified-imports
Should fail, GADTs is now disabled
base language is: Haskell2010
with the following modifiers:
@@ -82,5 +85,6 @@ warning settings:
-Wsemigroup
-Wnoncanonical-monoid-instances
-Wstar-is-type
+ -Wcompat-unqualified-imports
Should fail, GADTs is only enabled at the prompt
C :: T Int
diff --git a/testsuite/tests/ghci/should_run/ghcirun002.hs b/testsuite/tests/ghci/should_run/ghcirun002.hs
index d744359ed1..432712dccc 100644
--- a/testsuite/tests/ghci/should_run/ghcirun002.hs
+++ b/testsuite/tests/ghci/should_run/ghcirun002.hs
@@ -1,5 +1,5 @@
import Data.Maybe
-import Data.List
+import Data.List (intersperse)
data Dir = R | D | L | U deriving (Show, Eq, Enum)
type Spiral = ([[Int]], Int, Dir) -- (rows, current row, next direction)
diff --git a/testsuite/tests/module/Mod137_A.hs b/testsuite/tests/module/Mod137_A.hs
index ba71afce39..582ffbccd9 100644
--- a/testsuite/tests/module/Mod137_A.hs
+++ b/testsuite/tests/module/Mod137_A.hs
@@ -1,3 +1,4 @@
+{-# OPTIONS_GHC -Wno-compat-unqualified-imports #-}
module Mod137_A (module Data.Char) where
import Data.Char
diff --git a/testsuite/tests/module/Mod138_A.hs b/testsuite/tests/module/Mod138_A.hs
index 44f6645d1b..67cbe97c79 100644
--- a/testsuite/tests/module/Mod138_A.hs
+++ b/testsuite/tests/module/Mod138_A.hs
@@ -1,3 +1,4 @@
+{-# OPTIONS_GHC -Wno-compat-unqualified-imports #-}
module Mod138_A (module Data.Char) where
import qualified Data.Char
diff --git a/testsuite/tests/module/Mod141_A.hs b/testsuite/tests/module/Mod141_A.hs
index fc6c1da430..b49841be03 100644
--- a/testsuite/tests/module/Mod141_A.hs
+++ b/testsuite/tests/module/Mod141_A.hs
@@ -1,3 +1,4 @@
+{-# OPTIONS_GHC -Wno-compat-unqualified-imports #-}
module Mod141_A (partition, module Data.List) where
import Data.List hiding (partition)
diff --git a/testsuite/tests/module/mod154.hs b/testsuite/tests/module/mod154.hs
index 6155b830f0..4b7df0936c 100644
--- a/testsuite/tests/module/mod154.hs
+++ b/testsuite/tests/module/mod154.hs
@@ -1,3 +1,5 @@
+{-# OPTIONS_GHC -Wno-compat-unqualified-imports #-}
+
-- !!! Default export list isn't the same as (module M)
-- This should succeed, exporting only the local 'sort',
-- and not being confused by the 'sort' from 'List'.
diff --git a/testsuite/tests/numeric/should_run/CarryOverflow.hs b/testsuite/tests/numeric/should_run/CarryOverflow.hs
index f83c1cf15c..1a543de713 100644
--- a/testsuite/tests/numeric/should_run/CarryOverflow.hs
+++ b/testsuite/tests/numeric/should_run/CarryOverflow.hs
@@ -6,7 +6,7 @@ import GHC.Exts
import Control.Monad
import Data.Bits
-import Data.List
+import Data.List (sort, group)
import System.Exit
allEqual :: Eq a => [a] -> Bool
diff --git a/testsuite/tests/numeric/should_run/T8726.hs b/testsuite/tests/numeric/should_run/T8726.hs
index ba5803ab1d..41775e1f17 100644
--- a/testsuite/tests/numeric/should_run/T8726.hs
+++ b/testsuite/tests/numeric/should_run/T8726.hs
@@ -1,6 +1,6 @@
import Control.Monad
import Data.Bits
-import Data.List
+import Data.List (sortBy)
import Data.Ord
-- | test-values to use as numerator/denominator
diff --git a/testsuite/tests/overloadedlists/should_run/overloadedlistsrun05.hs b/testsuite/tests/overloadedlists/should_run/overloadedlistsrun05.hs
index 18d8cc1d01..3abdd5da87 100644
--- a/testsuite/tests/overloadedlists/should_run/overloadedlistsrun05.hs
+++ b/testsuite/tests/overloadedlists/should_run/overloadedlistsrun05.hs
@@ -1,16 +1,16 @@
+{-# OPTIONS_GHC -Wno-compat-unqualified-imports #-}
{-# LANGUAGE OverloadedLists, TypeFamilies, RebindableSyntax #-}
import Prelude
import Data.List
-main = do print []
- print [0,3..20]
- print [3]
+main = do print []
+ print [0,3..20]
+ print [3]
print [2..7]
print [20,2]
print [1,2,37]
-fromListN _ = length
+fromListN _ = length
fromList = length
-
diff --git a/testsuite/tests/parser/should_compile/mc16.hs b/testsuite/tests/parser/should_compile/mc16.hs
index 4ff2e169a1..bc8900b1dc 100644
--- a/testsuite/tests/parser/should_compile/mc16.hs
+++ b/testsuite/tests/parser/should_compile/mc16.hs
@@ -2,7 +2,7 @@
module Foo where
-import Data.List
+import Data.List (inits)
import GHC.Exts
foo = [ ()
diff --git a/testsuite/tests/parser/should_compile/read016.hs b/testsuite/tests/parser/should_compile/read016.hs
index 5c482f510d..99fd09cbab 100644
--- a/testsuite/tests/parser/should_compile/read016.hs
+++ b/testsuite/tests/parser/should_compile/read016.hs
@@ -2,8 +2,8 @@
-- !!! be empty.
module ShouldCompile where
-import Data.List ()
-import Data.List hiding ()
+import Data.Tuple ()
+import Data.Tuple hiding ()
x :: Int
x = 1
diff --git a/testsuite/tests/parser/should_compile/read062.hs b/testsuite/tests/parser/should_compile/read062.hs
index 3d816a28e2..3ce232302c 100644
--- a/testsuite/tests/parser/should_compile/read062.hs
+++ b/testsuite/tests/parser/should_compile/read062.hs
@@ -2,7 +2,7 @@
module Foo where
-import Data.List
+import Data.List (inits)
import GHC.Exts
foo = [ ()
diff --git a/testsuite/tests/parser/should_run/CountParserDeps.hs b/testsuite/tests/parser/should_run/CountParserDeps.hs
index b035c98e0d..f3dc6e6154 100644
--- a/testsuite/tests/parser/should_run/CountParserDeps.hs
+++ b/testsuite/tests/parser/should_run/CountParserDeps.hs
@@ -17,7 +17,6 @@ import HscMain
import GHC
import Util
import Data.Maybe
-import Data.List
import Control.Monad
import Control.Monad.IO.Class
import System.Environment
diff --git a/testsuite/tests/perf/join_points/join002.hs b/testsuite/tests/perf/join_points/join002.hs
index 49aecdcc7f..ac7c089aad 100644
--- a/testsuite/tests/perf/join_points/join002.hs
+++ b/testsuite/tests/perf/join_points/join002.hs
@@ -1,6 +1,6 @@
module Main where
-import Data.List
+import Data.List (find)
-- These four functions should all wind up the same; they represent successive
-- simplifications that should happen. (Actual details may vary, since find
diff --git a/testsuite/tests/perf/join_points/join003.hs b/testsuite/tests/perf/join_points/join003.hs
index 051c2d8bfe..e4ef841517 100644
--- a/testsuite/tests/perf/join_points/join003.hs
+++ b/testsuite/tests/perf/join_points/join003.hs
@@ -12,7 +12,7 @@ module Main (
main
) where
-import Data.List
+import Data.List (find)
divides :: Int -> Int -> Bool
p `divides` n = n `mod` p == 0
diff --git a/testsuite/tests/perf/should_run/T15263.hs b/testsuite/tests/perf/should_run/T15263.hs
index 3ba914217d..1755c165ee 100644
--- a/testsuite/tests/perf/should_run/T15263.hs
+++ b/testsuite/tests/perf/should_run/T15263.hs
@@ -1,6 +1,6 @@
module Main where
-import Data.List
+import qualified Data.List as L
expensive :: [Word]
expensive = [1 .. 10000]
@@ -10,13 +10,13 @@ cheap = repeat 2
test_zipWith :: IO ()
test_zipWith = do
- let zw3 = sum $ zipWith3 (\a b c -> a*b*c) expensive cheap cheap
- zw4 = sum $ zipWith4 (\a b c d -> a*b*c*d) expensive cheap cheap cheap
- zw5 = sum $ zipWith5 (\a b c d e ->
+ let zw3 = sum $ L.zipWith3 (\a b c -> a*b*c) expensive cheap cheap
+ zw4 = sum $ L.zipWith4 (\a b c d -> a*b*c*d) expensive cheap cheap cheap
+ zw5 = sum $ L.zipWith5 (\a b c d e ->
a*b*c*d*e) expensive cheap cheap cheap cheap
- zw6 = sum $ zipWith6 (\a b c d e f ->
+ zw6 = sum $ L.zipWith6 (\a b c d e f ->
a*b*c*d*e*f) expensive cheap cheap cheap cheap cheap
- zw7 = sum $ zipWith7 (\a b c d e f g ->
+ zw7 = sum $ L.zipWith7 (\a b c d e f g ->
a*b*c*d*e*f*g) expensive cheap cheap cheap cheap cheap cheap
putStrLn ("zipWith3: " ++ show zw3)
@@ -27,7 +27,7 @@ test_zipWith = do
test_zip3 :: IO ()
test_zip3 = do
- let z3 = foldr (\(x,y,z) acc -> x*y*z+acc) 0 (zip3 expensive cheap cheap)
+ let z3 = foldr (\(x,y,z) acc -> x*y*z+acc) 0 (L.zip3 expensive cheap cheap)
putStrLn ("zip3: " ++ show z3)
diff --git a/testsuite/tests/perf/should_run/T15426.hs b/testsuite/tests/perf/should_run/T15426.hs
index de88c28ce0..c85c7e7ec0 100644
--- a/testsuite/tests/perf/should_run/T15426.hs
+++ b/testsuite/tests/perf/should_run/T15426.hs
@@ -1,13 +1,13 @@
import Control.Exception (evaluate)
-import Data.List
+import qualified Data.List as L
-- The following will fuse with minimal heap usage provided
-- `findIndices` is marked `INLINABLE` instead of `INLINE`.
-unsafeFindIndex p = head . findIndices p
+unsafeFindIndex p = head . L.findIndices p
-main = do evaluate $ elemIndex 999999 [(1::Int)..1000000]
- evaluate $ elemIndices 999999 [(1::Int)..1000000]
- evaluate $ findIndex (>=999999) [(1::Int)..1000000]
- evaluate $ findIndices (>=999999) [(1::Int)..1000000]
+main = do evaluate $ L.elemIndex 999999 [(1::Int)..1000000]
+ evaluate $ L.elemIndices 999999 [(1::Int)..1000000]
+ evaluate $ L.findIndex (>=999999) [(1::Int)..1000000]
+ evaluate $ L.findIndices (>=999999) [(1::Int)..1000000]
evaluate $ unsafeFindIndex (>=999999) [(1::Int)..1000000]
diff --git a/testsuite/tests/perf/should_run/T5949.hs b/testsuite/tests/perf/should_run/T5949.hs
index a633aa05f5..f3f8cce0d3 100644
--- a/testsuite/tests/perf/should_run/T5949.hs
+++ b/testsuite/tests/perf/should_run/T5949.hs
@@ -1,4 +1,4 @@
-import Data.List
+import Data.List (foldr)
{-
This should get a worker that takes three arguments.
diff --git a/testsuite/tests/perf/space_leaks/space_leak_001.hs b/testsuite/tests/perf/space_leaks/space_leak_001.hs
index cabde0ae9b..139ab609a2 100644
--- a/testsuite/tests/perf/space_leaks/space_leak_001.hs
+++ b/testsuite/tests/perf/space_leaks/space_leak_001.hs
@@ -1,5 +1,5 @@
-import Data.List
+import Data.List (foldl')
main :: IO ()
main = print $ length $ show (foldl' (*) 1 [1..100000] :: Integer)
diff --git a/testsuite/tests/plugins/FrontendPlugin.hs b/testsuite/tests/plugins/FrontendPlugin.hs
index 9a6c5d0514..8a223beae9 100644
--- a/testsuite/tests/plugins/FrontendPlugin.hs
+++ b/testsuite/tests/plugins/FrontendPlugin.hs
@@ -8,7 +8,7 @@ import DriverPipeline hiding ( hsc_env )
import DriverPhases
import System.Exit
import Control.Monad
-import Data.List
+import Data.List (partition)
frontendPlugin :: FrontendPlugin
frontendPlugin = defaultFrontendPlugin {
diff --git a/testsuite/tests/primops/should_run/ArithInt16.hs b/testsuite/tests/primops/should_run/ArithInt16.hs
index 26d937042e..0f09e0b4fb 100644
--- a/testsuite/tests/primops/should_run/ArithInt16.hs
+++ b/testsuite/tests/primops/should_run/ArithInt16.hs
@@ -5,7 +5,7 @@
module Main where
import Data.Int
-import Data.List
+import Data.List (findIndex)
import GHC.Prim
import GHC.Exts
diff --git a/testsuite/tests/primops/should_run/ArithInt8.hs b/testsuite/tests/primops/should_run/ArithInt8.hs
index 77f4cea21a..18a472d073 100644
--- a/testsuite/tests/primops/should_run/ArithInt8.hs
+++ b/testsuite/tests/primops/should_run/ArithInt8.hs
@@ -5,7 +5,7 @@
module Main where
import Data.Int
-import Data.List
+import Data.List (findIndex)
import GHC.Prim
import GHC.Exts
diff --git a/testsuite/tests/primops/should_run/ArithWord16.hs b/testsuite/tests/primops/should_run/ArithWord16.hs
index ff86d95339..5870fd4751 100644
--- a/testsuite/tests/primops/should_run/ArithWord16.hs
+++ b/testsuite/tests/primops/should_run/ArithWord16.hs
@@ -6,7 +6,7 @@ module Main where
import Data.Word
import Data.Bits
-import Data.List
+import Data.List (findIndex)
import GHC.Prim
import GHC.Exts
diff --git a/testsuite/tests/primops/should_run/ArithWord8.hs b/testsuite/tests/primops/should_run/ArithWord8.hs
index ceac789878..b25d2b0e6f 100644
--- a/testsuite/tests/primops/should_run/ArithWord8.hs
+++ b/testsuite/tests/primops/should_run/ArithWord8.hs
@@ -6,7 +6,7 @@ module Main where
import Data.Word
import Data.Bits
-import Data.List
+import Data.List (findIndex)
import GHC.Prim
import GHC.Exts
diff --git a/testsuite/tests/primops/should_run/CmpInt16.hs b/testsuite/tests/primops/should_run/CmpInt16.hs
index 79588cb9b3..3fa89b5b31 100644
--- a/testsuite/tests/primops/should_run/CmpInt16.hs
+++ b/testsuite/tests/primops/should_run/CmpInt16.hs
@@ -4,7 +4,7 @@
module Main where
import Data.Int
-import Data.List
+import Data.List (findIndex)
import GHC.Prim
import GHC.Exts
diff --git a/testsuite/tests/primops/should_run/CmpInt8.hs b/testsuite/tests/primops/should_run/CmpInt8.hs
index daea22701d..7f0bcda973 100644
--- a/testsuite/tests/primops/should_run/CmpInt8.hs
+++ b/testsuite/tests/primops/should_run/CmpInt8.hs
@@ -4,7 +4,7 @@
module Main where
import Data.Int
-import Data.List
+import Data.List (findIndex)
import GHC.Prim
import GHC.Exts
diff --git a/testsuite/tests/primops/should_run/CmpWord16.hs b/testsuite/tests/primops/should_run/CmpWord16.hs
index 7adc270afc..1a69a10f4b 100644
--- a/testsuite/tests/primops/should_run/CmpWord16.hs
+++ b/testsuite/tests/primops/should_run/CmpWord16.hs
@@ -4,7 +4,7 @@
module Main where
import Data.Word
-import Data.List
+import Data.List (findIndex)
import GHC.Prim
import GHC.Exts
diff --git a/testsuite/tests/primops/should_run/CmpWord8.hs b/testsuite/tests/primops/should_run/CmpWord8.hs
index 101f7837b5..07f683108e 100644
--- a/testsuite/tests/primops/should_run/CmpWord8.hs
+++ b/testsuite/tests/primops/should_run/CmpWord8.hs
@@ -4,7 +4,7 @@
module Main where
import Data.Word
-import Data.List
+import Data.List (findIndex)
import GHC.Prim
import GHC.Exts
diff --git a/testsuite/tests/profiling/should_run/T11627a.hs b/testsuite/tests/profiling/should_run/T11627a.hs
index 3e1ce3cf8f..436b65aa4f 100644
--- a/testsuite/tests/profiling/should_run/T11627a.hs
+++ b/testsuite/tests/profiling/should_run/T11627a.hs
@@ -1,6 +1,6 @@
-- Original test case for #11627 (space_leak_001.hs)
-import Data.List
+import Data.List (foldl')
main :: IO ()
main = print $ length $ show (foldl' (*) 1 [1..100000] :: Integer)
diff --git a/testsuite/tests/quasiquotation/T7918.hs b/testsuite/tests/quasiquotation/T7918.hs
index 9cf060937e..507f4b3ee8 100644
--- a/testsuite/tests/quasiquotation/T7918.hs
+++ b/testsuite/tests/quasiquotation/T7918.hs
@@ -13,7 +13,7 @@ import Data.Data
import System.Environment
import Control.Monad
import Control.Monad.Trans.State
-import Data.List
+import Data.List (sortBy)
import Data.Ord
import Prelude hiding (traverse)
diff --git a/testsuite/tests/rebindable/DoRestrictedM.hs b/testsuite/tests/rebindable/DoRestrictedM.hs
index de28079769..c21f4a3721 100644
--- a/testsuite/tests/rebindable/DoRestrictedM.hs
+++ b/testsuite/tests/rebindable/DoRestrictedM.hs
@@ -11,10 +11,10 @@
module DoRestrictedM where
-import Data.List
import Prelude (const, String, ($), (.), Maybe(..))
import qualified Prelude
import qualified Data.Set as Set
+import Data.List ((++))
-- Defining the restricted monad
class MN2 m a where
diff --git a/testsuite/tests/rename/prog001/rn037.hs b/testsuite/tests/rename/prog001/rn037.hs
index 23a4cfa4b9..2886bac59c 100644
--- a/testsuite/tests/rename/prog001/rn037.hs
+++ b/testsuite/tests/rename/prog001/rn037.hs
@@ -1,3 +1,5 @@
+{-# OPTIONS_GHC -Wno-compat-unqualified-imports #-}
+
-- !!! Checking that you can hide a constructor
module ShouldCompile where
diff --git a/testsuite/tests/rename/should_compile/T1972.hs b/testsuite/tests/rename/should_compile/T1972.hs
index d4da5f41aa..7b6d7387c7 100644
--- a/testsuite/tests/rename/should_compile/T1972.hs
+++ b/testsuite/tests/rename/should_compile/T1972.hs
@@ -4,7 +4,7 @@
module Temp where
-import Data.List
+import Data.List (mapAccumL)
data Data = Data {name :: String}
@@ -17,4 +17,4 @@ mapAccumL y = y
test x = a+b
where
- (a,b,c) = x \ No newline at end of file
+ (a,b,c) = x
diff --git a/testsuite/tests/rename/should_compile/T1972.stderr b/testsuite/tests/rename/should_compile/T1972.stderr
index 439684a20c..78f58b5415 100644
--- a/testsuite/tests/rename/should_compile/T1972.stderr
+++ b/testsuite/tests/rename/should_compile/T1972.stderr
@@ -5,7 +5,7 @@ T1972.hs:12:3: warning: [-Wname-shadowing (in -Wall)]
T1972.hs:14:3: warning: [-Wname-shadowing (in -Wall)]
This binding for ‘mapAccumL’ shadows the existing bindings
- imported from ‘Data.List’ at T1972.hs:7:1-16
+ imported from ‘Data.List’ at T1972.hs:7:19-27
(and originally defined in ‘Data.Traversable’)
defined at T1972.hs:16:1
diff --git a/testsuite/tests/rename/should_compile/T4478.hs b/testsuite/tests/rename/should_compile/T4478.hs
index 0d6a5e1ea6..9e3fcee81a 100644
--- a/testsuite/tests/rename/should_compile/T4478.hs
+++ b/testsuite/tests/rename/should_compile/T4478.hs
@@ -1,3 +1,4 @@
+{-# OPTIONS_GHC -Wno-compat-unqualified-imports #-}
-- We don't want to warn about duplicate exports for things exported
-- by both "module" exports
diff --git a/testsuite/tests/rename/should_compile/T7167.hs b/testsuite/tests/rename/should_compile/T7167.hs
index 78e6938ef5..3fa28d2173 100644
--- a/testsuite/tests/rename/should_compile/T7167.hs
+++ b/testsuite/tests/rename/should_compile/T7167.hs
@@ -1,3 +1,4 @@
+{-# OPTIONS_GHC -Wno-compat-unqualified-imports #-}
{-# OPTIONS_GHC -fwarn-dodgy-imports #-}
module T7167 where
diff --git a/testsuite/tests/rename/should_compile/T7167.stderr b/testsuite/tests/rename/should_compile/T7167.stderr
index 22aaf640eb..4da1c5283e 100644
--- a/testsuite/tests/rename/should_compile/T7167.stderr
+++ b/testsuite/tests/rename/should_compile/T7167.stderr
@@ -1,3 +1,3 @@
-T7167.hs:5:1: warning: [-Wdodgy-imports (in -Wextra)]
+T7167.hs:6:1: warning: [-Wdodgy-imports (in -Wextra)]
Module ‘Data.List’ does not export ‘foo’
diff --git a/testsuite/tests/rename/should_compile/rn025.hs b/testsuite/tests/rename/should_compile/rn025.hs
index b8bf1ffe94..141d105f2d 100644
--- a/testsuite/tests/rename/should_compile/rn025.hs
+++ b/testsuite/tests/rename/should_compile/rn025.hs
@@ -1,3 +1,5 @@
+{-# OPTIONS_GHC -Wno-compat-unqualified-imports #-}
+
-- !!! Re-exporting a module whose contents is partially hidden.
module ShouldCompile ( module Data.List ) where
diff --git a/testsuite/tests/rename/should_compile/rn027.hs b/testsuite/tests/rename/should_compile/rn027.hs
index 76cefe9310..fb5bbdf529 100644
--- a/testsuite/tests/rename/should_compile/rn027.hs
+++ b/testsuite/tests/rename/should_compile/rn027.hs
@@ -1,3 +1,5 @@
+{-# OPTIONS_GHC -Wno-compat-unqualified-imports #-}
+
-- !!! Checking that an imported module may still have
-- !!! a local alias without having used 'qualified'.
module ShouldCompile where
diff --git a/testsuite/tests/rename/should_compile/rn031.hs b/testsuite/tests/rename/should_compile/rn031.hs
index 7b4a07d626..f84c793956 100644
--- a/testsuite/tests/rename/should_compile/rn031.hs
+++ b/testsuite/tests/rename/should_compile/rn031.hs
@@ -1,3 +1,5 @@
+{-# OPTIONS_GHC -Wno-compat-unqualified-imports #-}
+
-- !!! Checking that an imported module may still have
-- !!! a local alias without having used 'qualified'.
module ShouldCompile where
diff --git a/testsuite/tests/rename/should_compile/rn037.hs b/testsuite/tests/rename/should_compile/rn037.hs
index 46de96fae5..cd03c42056 100644
--- a/testsuite/tests/rename/should_compile/rn037.hs
+++ b/testsuite/tests/rename/should_compile/rn037.hs
@@ -1,4 +1,4 @@
{-# OPTIONS -fwarn-unused-imports #-}
-- !!! test unused import warning
-import Data.List
+import Data.Tuple
main = return () :: IO ()
diff --git a/testsuite/tests/rename/should_compile/rn037.stderr b/testsuite/tests/rename/should_compile/rn037.stderr
index eaf268f6ca..c386e896de 100644
--- a/testsuite/tests/rename/should_compile/rn037.stderr
+++ b/testsuite/tests/rename/should_compile/rn037.stderr
@@ -1,5 +1,5 @@
rn037.hs:3:1: warning: [-Wunused-imports (in -Wextra)]
- The import of ‘Data.List’ is redundant
- except perhaps to import instances from ‘Data.List’
- To import instances alone, use: import Data.List()
+ The import of ‘Data.Tuple’ is redundant
+ except perhaps to import instances from ‘Data.Tuple’
+ To import instances alone, use: import Data.Tuple()
diff --git a/testsuite/tests/rename/should_compile/rn060.hs b/testsuite/tests/rename/should_compile/rn060.hs
index aa6ff02191..ae5bbeeb68 100644
--- a/testsuite/tests/rename/should_compile/rn060.hs
+++ b/testsuite/tests/rename/should_compile/rn060.hs
@@ -1,3 +1,4 @@
+{-# OPTIONS_GHC -Wno-compat-unqualified-imports #-}
module Foo (module Data.List) where
diff --git a/testsuite/tests/rts/T10728.hs b/testsuite/tests/rts/T10728.hs
index a7c3d796f5..1e2a2103d4 100644
--- a/testsuite/tests/rts/T10728.hs
+++ b/testsuite/tests/rts/T10728.hs
@@ -4,7 +4,7 @@ module Main where
import GHC.Conc (getNumProcessors, getNumCapabilities)
import GHC.Environment
-import Data.List
+import Data.List (isPrefixOf)
main :: IO ()
main = do
diff --git a/testsuite/tests/rts/T2047.hs b/testsuite/tests/rts/T2047.hs
index 8ea791e53e..0ad38271fa 100644
--- a/testsuite/tests/rts/T2047.hs
+++ b/testsuite/tests/rts/T2047.hs
@@ -2,7 +2,7 @@ module Main where
import qualified Data.Set as Set
import Control.Monad
-import Data.List
+import Data.List (sort, partition)
---
---
diff --git a/testsuite/tests/rts/alloccounter1.hs b/testsuite/tests/rts/alloccounter1.hs
index 4b81896d2c..9fe682aca4 100644
--- a/testsuite/tests/rts/alloccounter1.hs
+++ b/testsuite/tests/rts/alloccounter1.hs
@@ -2,7 +2,7 @@ module Main where
import Control.Exception
import Control.Monad
-import Data.List
+import Data.List (sort)
import System.Mem
main = do
diff --git a/testsuite/tests/safeHaskell/unsafeLibs/GoodImport03.hs b/testsuite/tests/safeHaskell/unsafeLibs/GoodImport03.hs
index edd6d65fcb..2ea80fbd09 100644
--- a/testsuite/tests/safeHaskell/unsafeLibs/GoodImport03.hs
+++ b/testsuite/tests/safeHaskell/unsafeLibs/GoodImport03.hs
@@ -46,7 +46,7 @@ import Data.Functor
import Data.IORef
import Data.Int
import Data.Ix
-import Data.List
+import Data.List () -- -Wno-compat-unqualified-imports
import Data.Maybe
import Data.Monoid
import Data.Ord
diff --git a/testsuite/tests/simplCore/should_compile/T5342.hs b/testsuite/tests/simplCore/should_compile/T5342.hs
index c9a3130313..c1288b4f58 100644
--- a/testsuite/tests/simplCore/should_compile/T5342.hs
+++ b/testsuite/tests/simplCore/should_compile/T5342.hs
@@ -2,7 +2,7 @@
module T5342 (increaseAreas) where
import Control.Monad
-import Data.List
+import Data.List (sort)
nubSorted :: Eq a => [a] -> [a]
nubSorted = undefined
diff --git a/testsuite/tests/th/TH_RichKinds2.hs b/testsuite/tests/th/TH_RichKinds2.hs
index 9ac13a157b..5cdf919f91 100644
--- a/testsuite/tests/th/TH_RichKinds2.hs
+++ b/testsuite/tests/th/TH_RichKinds2.hs
@@ -10,7 +10,7 @@ module TH_RichKinds2 where
import qualified Data.Kind as K
import Data.Char
-import Data.List
+import Data.List (splitAt, span, elemIndex)
import Language.Haskell.TH
$(return [OpenTypeFamilyD (TypeFamilyHead
diff --git a/testsuite/tests/typecheck/should_run/tcrun021.hs b/testsuite/tests/typecheck/should_run/tcrun021.hs
index d6a31ebc0f..b9bda74c0c 100644
--- a/testsuite/tests/typecheck/should_run/tcrun021.hs
+++ b/testsuite/tests/typecheck/should_run/tcrun021.hs
@@ -7,7 +7,7 @@
module Main where
-import Data.List
+import Data.List ()
import Data.Map
class (Ord oid) => Object o oid | o -> oid where
diff --git a/testsuite/tests/warnings/should_compile/T11077.hs b/testsuite/tests/warnings/should_compile/T11077.hs
index 76533cb950..a5280d9f8d 100644
--- a/testsuite/tests/warnings/should_compile/T11077.hs
+++ b/testsuite/tests/warnings/should_compile/T11077.hs
@@ -1,3 +1,5 @@
+{-# OPTIONS_GHC -Wno-compat-unqualified-imports #-}
+
module T11077 (module X, foo) where
import Data.List as X
foo = undefined
diff --git a/testsuite/tests/warnings/should_compile/T11077.stderr b/testsuite/tests/warnings/should_compile/T11077.stderr
index 1d6804335b..9621e8d5e1 100644
--- a/testsuite/tests/warnings/should_compile/T11077.stderr
+++ b/testsuite/tests/warnings/should_compile/T11077.stderr
@@ -1,3 +1,3 @@
-T11077.hs:3:1: warning: [-Wmissing-exported-signatures]
+T11077.hs:5:1: warning: [-Wmissing-exported-signatures]
Top-level binding with no type signature: foo :: a