diff options
| author | Matthew Pickering <matthewtpickering@gmail.com> | 2021-08-23 13:30:44 +0100 |
|---|---|---|
| committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-12-03 10:12:04 -0500 |
| commit | 81082cf410fdcdbf10627f5334cc1dba1a9a2e06 (patch) | |
| tree | 49bb8038aab46f97ea2414ffc60652800614d4c2 /testsuite/tests/rename/should_compile | |
| parent | 0e274c39bf836d5bb846f5fa08649c75f85326ac (diff) | |
| download | haskell-81082cf410fdcdbf10627f5334cc1dba1a9a2e06.tar.gz | |
Revert "Data.List specialization to []"
This reverts commit bddecda1a4c96da21e3f5211743ce5e4c78793a2.
This implements the first step in the plan formulated in #20025 to
improve the communication and migration strategy for the proposed
changes to Data.List.
Requires changing the haddock submodule to update the test output.
Diffstat (limited to 'testsuite/tests/rename/should_compile')
7 files changed, 29 insertions, 2 deletions
diff --git a/testsuite/tests/rename/should_compile/T17244A.hs b/testsuite/tests/rename/should_compile/T17244A.hs new file mode 100644 index 0000000000..290120affd --- /dev/null +++ b/testsuite/tests/rename/should_compile/T17244A.hs @@ -0,0 +1,9 @@ +{-# OPTIONS_GHC -Wcompat-unqualified-imports #-} + +module T17244A (hello) where + +-- This should warn with -Wcompat-unqualified-imports. +import Data.List + +hello :: [Int] -> Int +hello = sum diff --git a/testsuite/tests/rename/should_compile/T17244A.stderr b/testsuite/tests/rename/should_compile/T17244A.stderr new file mode 100644 index 0000000000..621e9439f1 --- /dev/null +++ b/testsuite/tests/rename/should_compile/T17244A.stderr @@ -0,0 +1,5 @@ + +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.hs b/testsuite/tests/rename/should_compile/T17244C.hs new file mode 100644 index 0000000000..3da92dddd6 --- /dev/null +++ b/testsuite/tests/rename/should_compile/T17244C.hs @@ -0,0 +1,10 @@ +{-# OPTIONS_GHC -Wcompat-unqualified-imports #-} + +module T17244C (hello) where + +-- This should not warn with -Wcompat-unqualified-imports. +import Data.List (sum) + +hello :: [Int] -> Int +hello = sum + diff --git a/testsuite/tests/rename/should_compile/T17244C.stderr b/testsuite/tests/rename/should_compile/T17244C.stderr new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/testsuite/tests/rename/should_compile/T17244C.stderr diff --git a/testsuite/tests/rename/should_compile/T1972.stderr b/testsuite/tests/rename/should_compile/T1972.stderr index 779b2425ef..3311f0aded 100644 --- a/testsuite/tests/rename/should_compile/T1972.stderr +++ b/testsuite/tests/rename/should_compile/T1972.stderr @@ -6,6 +6,7 @@ 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 ca6d8e5be0..9e3fcee81a 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.Foldable) where +module T4478 (module Prelude, module Data.List) where import Prelude -import Data.Foldable +import Data.List diff --git a/testsuite/tests/rename/should_compile/all.T b/testsuite/tests/rename/should_compile/all.T index 8e55b3705a..536c5b9013 100644 --- a/testsuite/tests/rename/should_compile/all.T +++ b/testsuite/tests/rename/should_compile/all.T @@ -168,7 +168,9 @@ 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']) |
