summaryrefslogtreecommitdiff
path: root/libraries
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 /libraries
parentc2e301aeeae353a64be43e5fa9e7d464797d5648 (diff)
downloadhaskell-aede171a59f9b7b8022548c385a1cb8c4589f905.tar.gz
testsuite: Fix -Wcompat-unqualified-imports issues
Diffstat (limited to 'libraries')
-rw-r--r--libraries/base/tests/IO/newline001.hs2
-rw-r--r--libraries/base/tests/T11760.hs2
-rw-r--r--libraries/base/tests/T3474.hs2
-rw-r--r--libraries/base/tests/T9586.hs2
-rw-r--r--libraries/base/tests/genericNegative001.hs8
-rw-r--r--libraries/base/tests/inits.hs2
-rw-r--r--libraries/base/tests/isSuffixOf.hs2
-rw-r--r--libraries/base/tests/length001.hs2
-rw-r--r--libraries/base/tests/list001.hs1
-rw-r--r--libraries/base/tests/list002.hs2
-rw-r--r--libraries/base/tests/qsemn001.hs2
-rw-r--r--libraries/base/tests/tempfiles.hs2
12 files changed, 16 insertions, 13 deletions
diff --git a/libraries/base/tests/IO/newline001.hs b/libraries/base/tests/IO/newline001.hs
index b12a65bcaa..3da867509f 100644
--- a/libraries/base/tests/IO/newline001.hs
+++ b/libraries/base/tests/IO/newline001.hs
@@ -1,7 +1,7 @@
import System.IO
import GHC.IO.Handle
import Control.Monad
-import Data.List
+import Data.List (intercalate)
newlines = ["\n","\r","\r\n","\n\r","\n\n","\r\r"]
diff --git a/libraries/base/tests/T11760.hs b/libraries/base/tests/T11760.hs
index 0582c7e37d..1e2a81651f 100644
--- a/libraries/base/tests/T11760.hs
+++ b/libraries/base/tests/T11760.hs
@@ -12,7 +12,7 @@ import Control.Exception
import Data.STRef
import Data.IORef
import Control.Concurrent.MVar
-import Data.List
+import Data.List (foldl')
-- evil ST action that tries to synchronize (by busy waiting on the
-- shared STRef) with a concurrent evaluation
diff --git a/libraries/base/tests/T3474.hs b/libraries/base/tests/T3474.hs
index dbd59011b4..28d2cd3ba9 100644
--- a/libraries/base/tests/T3474.hs
+++ b/libraries/base/tests/T3474.hs
@@ -1,4 +1,4 @@
-import Data.List
+import Data.List (iterate')
-- this should evaluate in constant space
main :: IO ()
diff --git a/libraries/base/tests/T9586.hs b/libraries/base/tests/T9586.hs
index 8310b99bf4..cf1c35625c 100644
--- a/libraries/base/tests/T9586.hs
+++ b/libraries/base/tests/T9586.hs
@@ -1,3 +1,5 @@
+{-# OPTIONS_GHC -Wno-compat-unqualified-imports #-}
+
module XPrelude (module X) where
import Control.Monad as X
diff --git a/libraries/base/tests/genericNegative001.hs b/libraries/base/tests/genericNegative001.hs
index 98457e282c..7229bd6305 100644
--- a/libraries/base/tests/genericNegative001.hs
+++ b/libraries/base/tests/genericNegative001.hs
@@ -1,8 +1,8 @@
-- Test for https://gitlab.haskell.org/ghc/ghc/issues/2533
import System.Environment
-import Data.List
+import qualified Data.List as L
main = do
(n:_) <- getArgs
- print (genericTake (read n) "none taken")
- print (genericDrop (read n) "none dropped")
- print (genericSplitAt (read n) "none split")
+ print (L.genericTake (read n) "none taken")
+ print (L.genericDrop (read n) "none dropped")
+ print (L.genericSplitAt (read n) "none split")
diff --git a/libraries/base/tests/inits.hs b/libraries/base/tests/inits.hs
index 4474769dfd..b360fcdb49 100644
--- a/libraries/base/tests/inits.hs
+++ b/libraries/base/tests/inits.hs
@@ -1,7 +1,7 @@
{-# LANGUAGE RankNTypes #-}
module Main (main) where
-import Data.List
+import Data.List (reverse, scanl, inits)
-- A simple implementation of inits that should be obviously correct.
{-# NOINLINE initsR #-}
diff --git a/libraries/base/tests/isSuffixOf.hs b/libraries/base/tests/isSuffixOf.hs
index bcbb77f394..787a69c33b 100644
--- a/libraries/base/tests/isSuffixOf.hs
+++ b/libraries/base/tests/isSuffixOf.hs
@@ -1,5 +1,5 @@
module Main (main) where
-import Data.List
+import Data.List (isSuffixOf)
needles = ["","1","2","12","123","1234"]
haystacks = ["","a","ab","abc","1","2","3","a1","1a",
diff --git a/libraries/base/tests/length001.hs b/libraries/base/tests/length001.hs
index 321a1b9dfc..fd039597cd 100644
--- a/libraries/base/tests/length001.hs
+++ b/libraries/base/tests/length001.hs
@@ -1,7 +1,7 @@
module Main (main) where
-import Data.List
+import Data.List (genericLength)
main :: IO ()
main = do print (genericLength [1..10000000] :: Int)
diff --git a/libraries/base/tests/list001.hs b/libraries/base/tests/list001.hs
index 4c622afc62..8f3babe607 100644
--- a/libraries/base/tests/list001.hs
+++ b/libraries/base/tests/list001.hs
@@ -1,4 +1,5 @@
{-# LANGUAGE CPP #-}
+{-# OPTIONS_GHC -Wno-compat-unqualified-imports #-}
module Main where
import Data.List
diff --git a/libraries/base/tests/list002.hs b/libraries/base/tests/list002.hs
index 5e069e09f6..ebb9584bdb 100644
--- a/libraries/base/tests/list002.hs
+++ b/libraries/base/tests/list002.hs
@@ -1,6 +1,6 @@
-- !!! Test that List.sortBy is stable.
-import Data.List
+import Data.List (sortBy)
main = print (sortBy (\(a,b) (a',b')->compare a a')
([1,1,1,1,1,1,1,1,1,1]`zip`[1..10]))
diff --git a/libraries/base/tests/qsemn001.hs b/libraries/base/tests/qsemn001.hs
index 165efa5083..c61d2896c2 100644
--- a/libraries/base/tests/qsemn001.hs
+++ b/libraries/base/tests/qsemn001.hs
@@ -1,7 +1,7 @@
import Control.Concurrent
import Control.Exception
import Control.Monad
-import Data.List
+import Data.List (sort)
new = newQSemN
wait = waitQSemN
diff --git a/libraries/base/tests/tempfiles.hs b/libraries/base/tests/tempfiles.hs
index 2fc156034f..3b4d63d92b 100644
--- a/libraries/base/tests/tempfiles.hs
+++ b/libraries/base/tests/tempfiles.hs
@@ -1,6 +1,6 @@
import Control.Exception
-import Data.List
+import Data.List (isPrefixOf, isSuffixOf)
import System.FilePath
import System.Directory
import System.IO