summaryrefslogtreecommitdiff
path: root/testsuite/tests/warnings
diff options
context:
space:
mode:
authorEric Seidel <gridaphobe@gmail.com>2014-11-20 22:39:32 -0600
committerAustin Seipp <austin@well-typed.com>2014-11-20 22:39:55 -0600
commit067f1e4f20efc824badbac54da2f9484090cb39b (patch)
treed694cd30f43a1e6f5485b529a487c256b903f0c7 /testsuite/tests/warnings
parentf60eeb41ab48e73ea49fba64a745ddc4a6b8c085 (diff)
downloadhaskell-067f1e4f20efc824badbac54da2f9484090cb39b.tar.gz
Add flag `-fwarn-missing-exported-sigs`
Summary: add `-fwarn-missing-exported-sigs` to only warn about missing signatures if the name is exported Test Plan: validate, see testsuite/tests/warnings/should_compile/T2526.hs Reviewers: ezyang, austin, thomie Reviewed By: austin, thomie Subscribers: ezyang, thomie, carter Differential Revision: https://phabricator.haskell.org/D482 GHC Trac Issues: #2526 Conflicts: docs/users_guide/7.10.1-notes.xml
Diffstat (limited to 'testsuite/tests/warnings')
-rw-r--r--testsuite/tests/warnings/should_compile/T2526.hs7
-rw-r--r--testsuite/tests/warnings/should_compile/T2526.stderr3
-rw-r--r--testsuite/tests/warnings/should_compile/all.T2
3 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/tests/warnings/should_compile/T2526.hs b/testsuite/tests/warnings/should_compile/T2526.hs
new file mode 100644
index 0000000000..c77168c73b
--- /dev/null
+++ b/testsuite/tests/warnings/should_compile/T2526.hs
@@ -0,0 +1,7 @@
+module T2526 (foo) where
+
+-- This should generate a warning
+foo = 1
+
+-- This should not
+bar = 2
diff --git a/testsuite/tests/warnings/should_compile/T2526.stderr b/testsuite/tests/warnings/should_compile/T2526.stderr
new file mode 100644
index 0000000000..585c22dca4
--- /dev/null
+++ b/testsuite/tests/warnings/should_compile/T2526.stderr
@@ -0,0 +1,3 @@
+
+T2526.hs:4:1: Warning:
+ Top-level binding with no type signature: foo :: Integer
diff --git a/testsuite/tests/warnings/should_compile/all.T b/testsuite/tests/warnings/should_compile/all.T
index 903ab69a84..7fa8caf584 100644
--- a/testsuite/tests/warnings/should_compile/all.T
+++ b/testsuite/tests/warnings/should_compile/all.T
@@ -1,3 +1,5 @@
+# -fwarn-missing-exported-sigs should take precedence over -fwarn-missing-signatures
+test('T2526', normal, compile, ['-fwarn-missing-signatures -fwarn-missing-exported-sigs'])
test('T9178', extra_clean(['T9178.o', 'T9178DataType.o',
'T9178.hi', 'T9178DataType.hi']),
multimod_compile, ['T9178', '-Wall'])