diff options
author | Alex Rozenshteyn <rpglover64@gmail.com> | 2015-08-21 21:42:16 +0200 |
---|---|---|
committer | Thomas Miedema <thomasmiedema@gmail.com> | 2015-08-22 00:00:55 +0200 |
commit | a5061a96724922097e4181d452a64618e35fa297 (patch) | |
tree | a2ad14d0f2ad59b968d2fc140a7e90ba89d0386a /testsuite | |
parent | a1c008b30fc60a327afe098cf16bd14ca1e5e381 (diff) | |
download | haskell-a5061a96724922097e4181d452a64618e35fa297.tar.gz |
Check options before warning about source imports.
Summary: Fixes T10637
Reviewers: austin, bgamari, thomie
Subscribers: dfordivam, simonpj, thomie
Differential Revision: https://phabricator.haskell.org/D1157
GHC Trac Issues: #10637
Diffstat (limited to 'testsuite')
8 files changed, 16 insertions, 5 deletions
diff --git a/testsuite/tests/programs/hs-boot/hs-boot.stderr b/testsuite/tests/programs/hs-boot/hs-boot.stderr index 42ca073117..e69de29bb2 100644 --- a/testsuite/tests/programs/hs-boot/hs-boot.stderr +++ b/testsuite/tests/programs/hs-boot/hs-boot.stderr @@ -1,2 +0,0 @@ - -B.hs:5:23: Warning: {-# SOURCE #-} unnecessary in import of ‘A’ diff --git a/testsuite/tests/rename/should_compile/T3103/T3103.stderr b/testsuite/tests/rename/should_compile/T3103/T3103.stderr index f1d4c531fa..e69de29bb2 100644 --- a/testsuite/tests/rename/should_compile/T3103/T3103.stderr +++ b/testsuite/tests/rename/should_compile/T3103/T3103.stderr @@ -1,3 +0,0 @@ - -GHC/Word.hs:10:23: - Warning: {-# SOURCE #-} unnecessary in import of ‘GHC.Unicode’ diff --git a/testsuite/tests/warnings/should_compile/T10637/A.hs b/testsuite/tests/warnings/should_compile/T10637/A.hs new file mode 100644 index 0000000000..a5369fccc6 --- /dev/null +++ b/testsuite/tests/warnings/should_compile/T10637/A.hs @@ -0,0 +1,3 @@ +module A where + +data A = A diff --git a/testsuite/tests/warnings/should_compile/T10637/A.hs-boot b/testsuite/tests/warnings/should_compile/T10637/A.hs-boot new file mode 100644 index 0000000000..d843c00b78 --- /dev/null +++ b/testsuite/tests/warnings/should_compile/T10637/A.hs-boot @@ -0,0 +1 @@ +module A where diff --git a/testsuite/tests/warnings/should_compile/T10637/Makefile b/testsuite/tests/warnings/should_compile/T10637/Makefile new file mode 100644 index 0000000000..1c39d1c1fe --- /dev/null +++ b/testsuite/tests/warnings/should_compile/T10637/Makefile @@ -0,0 +1,3 @@ +TOP=../../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk diff --git a/testsuite/tests/warnings/should_compile/T10637/T10637.hs b/testsuite/tests/warnings/should_compile/T10637/T10637.hs new file mode 100644 index 0000000000..03a1e789ba --- /dev/null +++ b/testsuite/tests/warnings/should_compile/T10637/T10637.hs @@ -0,0 +1,4 @@ +module T10637 where + +import {-# SOURCE #-} A () +data B = B diff --git a/testsuite/tests/warnings/should_compile/T10637/T10637.stderr b/testsuite/tests/warnings/should_compile/T10637/T10637.stderr new file mode 100644 index 0000000000..0778bed810 --- /dev/null +++ b/testsuite/tests/warnings/should_compile/T10637/T10637.stderr @@ -0,0 +1,3 @@ + +T10637.hs:3:23: + warning: {-# SOURCE #-} unnecessary in import of ‘A’ diff --git a/testsuite/tests/warnings/should_compile/T10637/all.T b/testsuite/tests/warnings/should_compile/T10637/all.T new file mode 100644 index 0000000000..2be9756fae --- /dev/null +++ b/testsuite/tests/warnings/should_compile/T10637/all.T @@ -0,0 +1,2 @@ +test('T10637', extra_clean(['T10637.o','T10637.hi', 'A.hi', 'A.o', 'A.hi-boot', 'A.o-boot']), + multimod_compile, ['T10637', '-v0 -fwarn-unused-imports']) |