summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorOleg Grenrus <oleg.grenrus@iki.fi>2021-01-24 15:29:37 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-04-01 00:39:28 -0400
commitbddecda1a4c96da21e3f5211743ce5e4c78793a2 (patch)
treedca8990476f2c803df91c164f8169d1a40d8123d /testsuite
parent5192183f5f4df4e3c0b00346e633c5270ed16283 (diff)
downloadhaskell-bddecda1a4c96da21e3f5211743ce5e4c78793a2.tar.gz
Data.List specialization to []
- Remove GHC.OldList - Remove Data.OldList - compat-unqualified-imports is no-op - update haddock submodule
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/codeGen/should_run/T15038/common/Data/Trie/Naive.hs2
-rw-r--r--testsuite/tests/codeGen/should_run/T15038/src/Packed/Bytes.hs2
-rw-r--r--testsuite/tests/ghci/scripts/T14828.stdout6
-rw-r--r--testsuite/tests/ghci/scripts/ghci008.stdout4
-rw-r--r--testsuite/tests/overloadedlists/should_run/overloadedlistsrun05.hs1
-rw-r--r--testsuite/tests/perf/should_run/T5949.hs1
-rw-r--r--testsuite/tests/rename/should_compile/T17244A.stderr5
-rw-r--r--testsuite/tests/rename/should_compile/T17244C.stderr0
-rw-r--r--testsuite/tests/rename/should_compile/T1972.stderr1
-rw-r--r--testsuite/tests/rename/should_compile/T4478.hs4
-rw-r--r--testsuite/tests/rename/should_compile/all.T2
-rw-r--r--testsuite/tests/rename/should_fail/T17244A.hs (renamed from testsuite/tests/rename/should_compile/T17244A.hs)3
-rw-r--r--testsuite/tests/rename/should_fail/T17244A.stderr10
-rw-r--r--testsuite/tests/rename/should_fail/T17244C.hs (renamed from testsuite/tests/rename/should_compile/T17244C.hs)1
-rw-r--r--testsuite/tests/rename/should_fail/T17244C.stderr10
-rw-r--r--testsuite/tests/rename/should_fail/all.T2
-rw-r--r--testsuite/tests/rename/should_fail/rnfail040.stderr1
-rw-r--r--testsuite/tests/simplCore/should_run/T10830.hs2
-rw-r--r--testsuite/tests/typecheck/should_compile/subsumption_sort_hole_fits.stderr4
19 files changed, 37 insertions, 24 deletions
diff --git a/testsuite/tests/codeGen/should_run/T15038/common/Data/Trie/Naive.hs b/testsuite/tests/codeGen/should_run/T15038/common/Data/Trie/Naive.hs
index a138615b2d..b13aece069 100644
--- a/testsuite/tests/codeGen/should_run/T15038/common/Data/Trie/Naive.hs
+++ b/testsuite/tests/codeGen/should_run/T15038/common/Data/Trie/Naive.hs
@@ -19,7 +19,7 @@ import Data.Map (Map)
import Data.Bifunctor (second)
import Packed.Bytes (Bytes)
import qualified Data.Char
-import qualified GHC.OldList as L
+import qualified Data.List as L
import qualified Packed.Bytes.Parser as P
import qualified Packed.Bytes as B
import qualified Data.Semigroup as SG
diff --git a/testsuite/tests/codeGen/should_run/T15038/src/Packed/Bytes.hs b/testsuite/tests/codeGen/should_run/T15038/src/Packed/Bytes.hs
index 224e03f75d..d4538506df 100644
--- a/testsuite/tests/codeGen/should_run/T15038/src/Packed/Bytes.hs
+++ b/testsuite/tests/codeGen/should_run/T15038/src/Packed/Bytes.hs
@@ -27,7 +27,7 @@ import Data.Primitive (ByteArray(..))
import Data.Word (Word8)
import Control.Monad.ST (runST, ST)
import qualified Data.Primitive as PM
-import qualified GHC.OldList as L
+import qualified Data.List as L
data Bytes = Bytes
{-# UNPACK #-} !ByteArray -- payload
diff --git a/testsuite/tests/ghci/scripts/T14828.stdout b/testsuite/tests/ghci/scripts/T14828.stdout
index 501f8004d5..dfc7fb4059 100644
--- a/testsuite/tests/ghci/scripts/T14828.stdout
+++ b/testsuite/tests/ghci/scripts/T14828.stdout
@@ -10,7 +10,5 @@ pure :: Applicative f => a -> f a
pure = (_t4::forall a. Applicative f1 => a -> f1 a)
mempty = (_t5::Monoid a => a)
mappend = (_t6::Monoid a => a -> a -> a)
-foldl' = (_t7::forall b a.
- Foldable t =>
- (b -> a -> b) -> b -> t a -> b)
-f = (_t8::(forall a. a -> a) -> b -> b)
+foldl' = (_t7::(b -> a1 -> b) -> b -> [a1] -> b)
+f = (_t8::(forall a. a -> a) -> b1 -> b1)
diff --git a/testsuite/tests/ghci/scripts/ghci008.stdout b/testsuite/tests/ghci/scripts/ghci008.stdout
index 3f62f3f7f2..812dffc36a 100644
--- a/testsuite/tests/ghci/scripts/ghci008.stdout
+++ b/testsuite/tests/ghci/scripts/ghci008.stdout
@@ -40,5 +40,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’
-base-4.13.0.0:Data.OldList.isPrefixOf :: Eq a => [a] -> [a] -> Bool
- -- Defined in ‘base-4.13.0.0:Data.OldList’
+Data.List.isPrefixOf :: Eq a => [a] -> [a] -> Bool
+ -- Defined in ‘Data.List’
diff --git a/testsuite/tests/overloadedlists/should_run/overloadedlistsrun05.hs b/testsuite/tests/overloadedlists/should_run/overloadedlistsrun05.hs
index 3abdd5da87..c1ed84d0fa 100644
--- a/testsuite/tests/overloadedlists/should_run/overloadedlistsrun05.hs
+++ b/testsuite/tests/overloadedlists/should_run/overloadedlistsrun05.hs
@@ -2,7 +2,6 @@
{-# LANGUAGE OverloadedLists, TypeFamilies, RebindableSyntax #-}
import Prelude
-import Data.List
main = do print []
print [0,3..20]
diff --git a/testsuite/tests/perf/should_run/T5949.hs b/testsuite/tests/perf/should_run/T5949.hs
index f3f8cce0d3..7a65d582ce 100644
--- a/testsuite/tests/perf/should_run/T5949.hs
+++ b/testsuite/tests/perf/should_run/T5949.hs
@@ -1,3 +1,4 @@
+import Prelude hiding (foldr)
import Data.List (foldr)
{-
diff --git a/testsuite/tests/rename/should_compile/T17244A.stderr b/testsuite/tests/rename/should_compile/T17244A.stderr
deleted file mode 100644
index 621e9439f1..0000000000
--- a/testsuite/tests/rename/should_compile/T17244A.stderr
+++ /dev/null
@@ -1,5 +0,0 @@
-
-T17244A.hs:6:8: warning: [-Wcompat-unqualified-imports (in -Wcompat)]
- To ensure compatibility with future core libraries changes
- imports to Data.List should be
- either qualified or have an explicit import list.
diff --git a/testsuite/tests/rename/should_compile/T17244C.stderr b/testsuite/tests/rename/should_compile/T17244C.stderr
deleted file mode 100644
index e69de29bb2..0000000000
--- a/testsuite/tests/rename/should_compile/T17244C.stderr
+++ /dev/null
diff --git a/testsuite/tests/rename/should_compile/T1972.stderr b/testsuite/tests/rename/should_compile/T1972.stderr
index 3311f0aded..779b2425ef 100644
--- a/testsuite/tests/rename/should_compile/T1972.stderr
+++ b/testsuite/tests/rename/should_compile/T1972.stderr
@@ -6,7 +6,6 @@ T1972.hs:13:3: warning: [-Wname-shadowing (in -Wall)]
T1972.hs:15:3: warning: [-Wname-shadowing (in -Wall)]
This binding for ‘mapAccumL’ shadows the existing bindings
imported from ‘Data.List’ at T1972.hs:8:19-27
- (and originally defined in ‘Data.Traversable’)
defined at T1972.hs:17:1
T1972.hs:21:10: warning: [-Wunused-local-binds (in -Wextra, -Wunused-binds)]
diff --git a/testsuite/tests/rename/should_compile/T4478.hs b/testsuite/tests/rename/should_compile/T4478.hs
index 9e3fcee81a..ca6d8e5be0 100644
--- a/testsuite/tests/rename/should_compile/T4478.hs
+++ b/testsuite/tests/rename/should_compile/T4478.hs
@@ -2,7 +2,7 @@
-- We don't want to warn about duplicate exports for things exported
-- by both "module" exports
-module T4478 (module Prelude, module Data.List) where
+module T4478 (module Prelude, module Data.Foldable) where
import Prelude
-import Data.List
+import Data.Foldable
diff --git a/testsuite/tests/rename/should_compile/all.T b/testsuite/tests/rename/should_compile/all.T
index 71d631e499..92464ca55b 100644
--- a/testsuite/tests/rename/should_compile/all.T
+++ b/testsuite/tests/rename/should_compile/all.T
@@ -169,9 +169,7 @@ test('T15798b', normal, compile, [''])
test('T15798c', normal, compile, [''])
test('T16116a', normal, compile, [''])
test('T15957', normal, compile, ['-Werror -Wredundant-record-wildcards -Wunused-record-wildcards'])
-test('T17244A', normal, compile, ['-Wno-error=compat-unqualified-imports'])
test('T17244B', normal, compile, [''])
-test('T17244C', normal, compile, [''])
test('T17832', [], multimod_compile, ['T17832M1', 'T17832M2'])
test('T17837', normal, compile, [''])
test('T18497', [], makefile_test, ['T18497'])
diff --git a/testsuite/tests/rename/should_compile/T17244A.hs b/testsuite/tests/rename/should_fail/T17244A.hs
index 290120affd..e0152d95d2 100644
--- a/testsuite/tests/rename/should_compile/T17244A.hs
+++ b/testsuite/tests/rename/should_fail/T17244A.hs
@@ -2,7 +2,8 @@
module T17244A (hello) where
--- This should warn with -Wcompat-unqualified-imports.
+-- This should NOT warn with -Wcompat-unqualified-imports,
+-- Instead this just fails.
import Data.List
hello :: [Int] -> Int
diff --git a/testsuite/tests/rename/should_fail/T17244A.stderr b/testsuite/tests/rename/should_fail/T17244A.stderr
new file mode 100644
index 0000000000..6286a71de2
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/T17244A.stderr
@@ -0,0 +1,10 @@
+
+T17244A.hs:10:9: error:
+ Ambiguous occurrence ‘sum’
+ It could refer to
+ either ‘Prelude.sum’,
+ imported from ‘Prelude’ at T17244A.hs:3:8-14
+ (and originally defined in ‘Data.Foldable’)
+ or ‘Data.List.sum’,
+ imported from ‘Data.List’ at T17244A.hs:7:1-16
+ (and originally defined in ‘GHC.List’)
diff --git a/testsuite/tests/rename/should_compile/T17244C.hs b/testsuite/tests/rename/should_fail/T17244C.hs
index 3da92dddd6..e77ff39b61 100644
--- a/testsuite/tests/rename/should_compile/T17244C.hs
+++ b/testsuite/tests/rename/should_fail/T17244C.hs
@@ -3,6 +3,7 @@
module T17244C (hello) where
-- This should not warn with -Wcompat-unqualified-imports.
+-- But not his fails, as sum name clashes with Prelude
import Data.List (sum)
hello :: [Int] -> Int
diff --git a/testsuite/tests/rename/should_fail/T17244C.stderr b/testsuite/tests/rename/should_fail/T17244C.stderr
new file mode 100644
index 0000000000..71570a01bd
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/T17244C.stderr
@@ -0,0 +1,10 @@
+
+T17244C.hs:10:9: error:
+ Ambiguous occurrence ‘sum’
+ It could refer to
+ either ‘Prelude.sum’,
+ imported from ‘Prelude’ at T17244C.hs:3:8-14
+ (and originally defined in ‘Data.Foldable’)
+ or ‘Data.List.sum’,
+ imported from ‘Data.List’ at T17244C.hs:7:19-21
+ (and originally defined in ‘GHC.List’)
diff --git a/testsuite/tests/rename/should_fail/all.T b/testsuite/tests/rename/should_fail/all.T
index 833e2d88f3..475aef9c6c 100644
--- a/testsuite/tests/rename/should_fail/all.T
+++ b/testsuite/tests/rename/should_fail/all.T
@@ -155,6 +155,8 @@ test('T16385', normal, compile_fail, [''])
test('T16504', normal, compile_fail, [''])
test('T14548', normal, compile_fail, [''])
test('T16610', normal, compile_fail, [''])
+test('T17244A', normal, compile_fail, ['-Wno-error=compat-unqualified-imports'])
+test('T17244C', normal, compile_fail, [''])
test('T17593', normal, compile_fail, [''])
test('T18021', normal, compile_fail, [''])
test('T18145', normal, compile_fail, [''])
diff --git a/testsuite/tests/rename/should_fail/rnfail040.stderr b/testsuite/tests/rename/should_fail/rnfail040.stderr
index 33f2f8cba9..9cd16615e0 100644
--- a/testsuite/tests/rename/should_fail/rnfail040.stderr
+++ b/testsuite/tests/rename/should_fail/rnfail040.stderr
@@ -3,7 +3,6 @@ rnfail040.hs:7:12: error:
Conflicting exports for ‘nub’:
‘module M’ exports ‘M.nub’
imported from ‘Data.List’ at rnfail040.hs:10:2-22
- (and originally defined in ‘base-4.13.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)
diff --git a/testsuite/tests/simplCore/should_run/T10830.hs b/testsuite/tests/simplCore/should_run/T10830.hs
index 354f0f513a..3c62171db2 100644
--- a/testsuite/tests/simplCore/should_run/T10830.hs
+++ b/testsuite/tests/simplCore/should_run/T10830.hs
@@ -1,3 +1,3 @@
-import GHC.OldList
+import Data.List (maximumBy)
main :: IO ()
main = maximumBy compare [1..10000] `seq` return ()
diff --git a/testsuite/tests/typecheck/should_compile/subsumption_sort_hole_fits.stderr b/testsuite/tests/typecheck/should_compile/subsumption_sort_hole_fits.stderr
index a081a78582..7f9b3e6464 100644
--- a/testsuite/tests/typecheck/should_compile/subsumption_sort_hole_fits.stderr
+++ b/testsuite/tests/typecheck/should_compile/subsumption_sort_hole_fits.stderr
@@ -8,10 +8,10 @@ subsumption_sort_hole_fits.hs:2:5: warning: [-Wtyped-holes (in -Wdefault)]
Valid hole fits include
lines :: String -> [String]
(imported from ‘Prelude’ at subsumption_sort_hole_fits.hs:1:1
- (and originally defined in ‘base-4.16.0.0:Data.OldList’))
+ (and originally defined in ‘Data.List’))
words :: String -> [String]
(imported from ‘Prelude’ at subsumption_sort_hole_fits.hs:1:1
- (and originally defined in ‘base-4.16.0.0:Data.OldList’))
+ (and originally defined in ‘Data.List’))
read :: forall a. Read a => String -> a
with read @[String]
(imported from ‘Prelude’ at subsumption_sort_hole_fits.hs:1:1