summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorMichiel de Bruijne <m.debruijne@matrict.nl>2021-01-05 09:44:11 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-02-22 18:26:52 -0500
commite1f133bf5ee30f25a94b4f3bf4d26d1a9381f0d9 (patch)
tree6ff9aa4b04431c57ce6c207a2017cd1e051615f6 /testsuite
parentf90487cacb16e8398c4c4a84de5a1e33ac4e7867 (diff)
downloadhaskell-e1f133bf5ee30f25a94b4f3bf4d26d1a9381f0d9.tar.gz
Prefer -Wmissing-signatures over -Wmissing-exported-signatures (#14794)
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/warnings/should_compile/T14794a.hs31
-rw-r--r--testsuite/tests/warnings/should_compile/T14794a.stderr12
-rw-r--r--testsuite/tests/warnings/should_compile/T14794b.hs31
-rw-r--r--testsuite/tests/warnings/should_compile/T14794b.stderr12
-rw-r--r--testsuite/tests/warnings/should_compile/T14794c.hs31
-rw-r--r--testsuite/tests/warnings/should_compile/T14794c.stderr12
-rw-r--r--testsuite/tests/warnings/should_compile/T14794d.hs31
-rw-r--r--testsuite/tests/warnings/should_compile/T14794d.stderr6
-rw-r--r--testsuite/tests/warnings/should_compile/T14794e.hs31
-rw-r--r--testsuite/tests/warnings/should_compile/T14794e.stderr12
-rw-r--r--testsuite/tests/warnings/should_compile/T14794f.hs31
-rw-r--r--testsuite/tests/warnings/should_compile/T14794f.stderr3
-rw-r--r--testsuite/tests/warnings/should_compile/T14794g.hs31
-rw-r--r--testsuite/tests/warnings/should_compile/T14794g.stderr6
-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.T10
17 files changed, 288 insertions, 12 deletions
diff --git a/testsuite/tests/warnings/should_compile/T14794a.hs b/testsuite/tests/warnings/should_compile/T14794a.hs
new file mode 100644
index 0000000000..224eaf64f7
--- /dev/null
+++ b/testsuite/tests/warnings/should_compile/T14794a.hs
@@ -0,0 +1,31 @@
+{-# LANGUAGE PatternSynonyms #-}
+{-# OPTIONS_GHC -Wmissing-signatures -Wmissing-exported-signatures -Wmissing-pattern-synonym-signatures #-}
+
+module T14794a (test1, pattern Test2, test3, pattern Test4) where
+
+-- This should generate warnings with;
+-- -Wmissing-signatures -Wmissing-exported-signatures -Wmissing-pattern-synonym-signatures
+
+test3 = True
+
+pattern Test4 <- True
+
+test7 = True
+
+pattern Test8 <- True
+
+
+-- This should not generate warnings with;
+-- -Wmissing-signatures -Wmissing-exported-signatures -Wmissing-pattern-synonym-signatures
+
+test1 :: Bool
+test1 = True
+
+pattern Test2 :: Bool
+pattern Test2 <- True
+
+test5 :: Bool
+test5 = True
+
+pattern Test6 :: Bool
+pattern Test6 <- True
diff --git a/testsuite/tests/warnings/should_compile/T14794a.stderr b/testsuite/tests/warnings/should_compile/T14794a.stderr
new file mode 100644
index 0000000000..166d59ab37
--- /dev/null
+++ b/testsuite/tests/warnings/should_compile/T14794a.stderr
@@ -0,0 +1,12 @@
+
+T14794a.hs:9:1: warning: [-Wmissing-signatures (in -Wall)]
+ Top-level binding with no type signature: test3 :: Bool
+
+T14794a.hs:11:1: warning: [-Wmissing-signatures (in -Wall)]
+ Pattern synonym with no type signature: pattern Test4 :: Bool
+
+T14794a.hs:13:1: warning: [-Wmissing-signatures (in -Wall)]
+ Top-level binding with no type signature: test7 :: Bool
+
+T14794a.hs:15:1: warning: [-Wmissing-signatures (in -Wall)]
+ Pattern synonym with no type signature: pattern Test8 :: Bool
diff --git a/testsuite/tests/warnings/should_compile/T14794b.hs b/testsuite/tests/warnings/should_compile/T14794b.hs
new file mode 100644
index 0000000000..7c542b4dc1
--- /dev/null
+++ b/testsuite/tests/warnings/should_compile/T14794b.hs
@@ -0,0 +1,31 @@
+{-# LANGUAGE PatternSynonyms #-}
+{-# OPTIONS_GHC -Wmissing-signatures -Wmissing-exported-signatures #-}
+
+module T14794b (test1, pattern Test2, test3, pattern Test4) where
+
+-- This should generate warnings with;
+-- -Wmissing-signatures -Wmissing-exported-signatures
+
+test3 = True
+
+pattern Test4 <- True
+
+test7 = True
+
+pattern Test8 <- True
+
+
+-- This should not generate warnings with;
+-- -Wmissing-signatures -Wmissing-exported-signatures
+
+test1 :: Bool
+test1 = True
+
+pattern Test2 :: Bool
+pattern Test2 <- True
+
+test5 :: Bool
+test5 = True
+
+pattern Test6 :: Bool
+pattern Test6 <- True
diff --git a/testsuite/tests/warnings/should_compile/T14794b.stderr b/testsuite/tests/warnings/should_compile/T14794b.stderr
new file mode 100644
index 0000000000..6109a4c985
--- /dev/null
+++ b/testsuite/tests/warnings/should_compile/T14794b.stderr
@@ -0,0 +1,12 @@
+
+T14794b.hs:9:1: warning: [-Wmissing-signatures (in -Wall)]
+ Top-level binding with no type signature: test3 :: Bool
+
+T14794b.hs:11:1: warning: [-Wmissing-signatures (in -Wall)]
+ Pattern synonym with no type signature: pattern Test4 :: Bool
+
+T14794b.hs:13:1: warning: [-Wmissing-signatures (in -Wall)]
+ Top-level binding with no type signature: test7 :: Bool
+
+T14794b.hs:15:1: warning: [-Wmissing-signatures (in -Wall)]
+ Pattern synonym with no type signature: pattern Test8 :: Bool
diff --git a/testsuite/tests/warnings/should_compile/T14794c.hs b/testsuite/tests/warnings/should_compile/T14794c.hs
new file mode 100644
index 0000000000..742ca3c91c
--- /dev/null
+++ b/testsuite/tests/warnings/should_compile/T14794c.hs
@@ -0,0 +1,31 @@
+{-# LANGUAGE PatternSynonyms #-}
+{-# OPTIONS_GHC -Wmissing-signatures -Wmissing-pattern-synonym-signatures #-}
+
+module T14794c (test1, pattern Test2, test3, pattern Test4) where
+
+-- This should generate warnings with;
+-- -Wmissing-signatures -Wmissing-pattern-synonym-signatures
+
+test3 = True
+
+pattern Test4 <- True
+
+test7 = True
+
+pattern Test8 <- True
+
+
+-- This should not generate warnings with;
+-- -Wmissing-signatures -Wmissing-pattern-synonym-signatures
+
+test1 :: Bool
+test1 = True
+
+pattern Test2 :: Bool
+pattern Test2 <- True
+
+test5 :: Bool
+test5 = True
+
+pattern Test6 :: Bool
+pattern Test6 <- True
diff --git a/testsuite/tests/warnings/should_compile/T14794c.stderr b/testsuite/tests/warnings/should_compile/T14794c.stderr
new file mode 100644
index 0000000000..95cbb4d16f
--- /dev/null
+++ b/testsuite/tests/warnings/should_compile/T14794c.stderr
@@ -0,0 +1,12 @@
+
+T14794c.hs:9:1: warning: [-Wmissing-signatures (in -Wall)]
+ Top-level binding with no type signature: test3 :: Bool
+
+T14794c.hs:11:1: warning: [-Wmissing-signatures (in -Wall)]
+ Pattern synonym with no type signature: pattern Test4 :: Bool
+
+T14794c.hs:13:1: warning: [-Wmissing-signatures (in -Wall)]
+ Top-level binding with no type signature: test7 :: Bool
+
+T14794c.hs:15:1: warning: [-Wmissing-signatures (in -Wall)]
+ Pattern synonym with no type signature: pattern Test8 :: Bool
diff --git a/testsuite/tests/warnings/should_compile/T14794d.hs b/testsuite/tests/warnings/should_compile/T14794d.hs
new file mode 100644
index 0000000000..8928df75d3
--- /dev/null
+++ b/testsuite/tests/warnings/should_compile/T14794d.hs
@@ -0,0 +1,31 @@
+{-# LANGUAGE PatternSynonyms #-}
+{-# OPTIONS_GHC -Wmissing-exported-signatures -Wmissing-pattern-synonym-signatures #-}
+
+module T14794d (test1, pattern Test2, test3, pattern Test4) where
+
+-- This should generate warnings with;
+-- -Wmissing-exported-signatures -Wmissing-pattern-synonym-signatures
+
+test3 = True
+
+pattern Test4 <- True
+
+
+-- This should not generate warnings with;
+-- -Wmissing-exported-signatures -Wmissing-pattern-synonym-signatures
+
+test1 :: Bool
+test1 = True
+
+pattern Test2 :: Bool
+pattern Test2 <- True
+
+test5 :: Bool
+test5 = True
+
+pattern Test6 :: Bool
+pattern Test6 <- True
+
+test7 = True
+
+pattern Test8 <- True
diff --git a/testsuite/tests/warnings/should_compile/T14794d.stderr b/testsuite/tests/warnings/should_compile/T14794d.stderr
new file mode 100644
index 0000000000..3388d17316
--- /dev/null
+++ b/testsuite/tests/warnings/should_compile/T14794d.stderr
@@ -0,0 +1,6 @@
+
+T14794d.hs:9:1: warning: [-Wmissing-exported-signatures]
+ Top-level binding with no type signature: test3 :: Bool
+
+T14794d.hs:11:1: warning: [-Wmissing-exported-signatures]
+ Pattern synonym with no type signature: pattern Test4 :: Bool
diff --git a/testsuite/tests/warnings/should_compile/T14794e.hs b/testsuite/tests/warnings/should_compile/T14794e.hs
new file mode 100644
index 0000000000..051cf347d6
--- /dev/null
+++ b/testsuite/tests/warnings/should_compile/T14794e.hs
@@ -0,0 +1,31 @@
+{-# LANGUAGE PatternSynonyms #-}
+{-# OPTIONS_GHC -Wmissing-signatures #-}
+
+module T14794e (test1, pattern Test2, test3, pattern Test4) where
+
+-- This should generate warnings with;
+-- -Wmissing-signatures
+
+test3 = True
+
+pattern Test4 <- True
+
+test7 = True
+
+pattern Test8 <- True
+
+
+-- This should not generate warnings with;
+-- -Wmissing-signatures
+
+test1 :: Bool
+test1 = True
+
+pattern Test2 :: Bool
+pattern Test2 <- True
+
+test5 :: Bool
+test5 = True
+
+pattern Test6 :: Bool
+pattern Test6 <- True
diff --git a/testsuite/tests/warnings/should_compile/T14794e.stderr b/testsuite/tests/warnings/should_compile/T14794e.stderr
new file mode 100644
index 0000000000..f0e4ddbc4c
--- /dev/null
+++ b/testsuite/tests/warnings/should_compile/T14794e.stderr
@@ -0,0 +1,12 @@
+
+T14794e.hs:9:1: warning: [-Wmissing-signatures (in -Wall)]
+ Top-level binding with no type signature: test3 :: Bool
+
+T14794e.hs:11:1: warning: [-Wmissing-signatures (in -Wall)]
+ Pattern synonym with no type signature: pattern Test4 :: Bool
+
+T14794e.hs:13:1: warning: [-Wmissing-signatures (in -Wall)]
+ Top-level binding with no type signature: test7 :: Bool
+
+T14794e.hs:15:1: warning: [-Wmissing-signatures (in -Wall)]
+ Pattern synonym with no type signature: pattern Test8 :: Bool
diff --git a/testsuite/tests/warnings/should_compile/T14794f.hs b/testsuite/tests/warnings/should_compile/T14794f.hs
new file mode 100644
index 0000000000..c2cf58f174
--- /dev/null
+++ b/testsuite/tests/warnings/should_compile/T14794f.hs
@@ -0,0 +1,31 @@
+{-# LANGUAGE PatternSynonyms #-}
+{-# OPTIONS_GHC -Wmissing-exported-signatures #-}
+
+module T14794f (test1, pattern Test2, test3, pattern Test4) where
+
+-- This should generate warnings with;
+-- -Wmissing-exported-signatures
+
+test3 = True
+
+
+-- This should not generate warnings with;
+-- -Wmissing-exported-signatures
+
+test1 :: Bool
+test1 = True
+
+pattern Test2 :: Bool
+pattern Test2 <- True
+
+pattern Test4 <- True
+
+test5 :: Bool
+test5 = True
+
+pattern Test6 :: Bool
+pattern Test6 <- True
+
+test7 = True
+
+pattern Test8 <- True
diff --git a/testsuite/tests/warnings/should_compile/T14794f.stderr b/testsuite/tests/warnings/should_compile/T14794f.stderr
new file mode 100644
index 0000000000..b751aad98e
--- /dev/null
+++ b/testsuite/tests/warnings/should_compile/T14794f.stderr
@@ -0,0 +1,3 @@
+
+T14794f.hs:9:1: warning: [-Wmissing-exported-signatures]
+ Top-level binding with no type signature: test3 :: Bool
diff --git a/testsuite/tests/warnings/should_compile/T14794g.hs b/testsuite/tests/warnings/should_compile/T14794g.hs
new file mode 100644
index 0000000000..eec2210203
--- /dev/null
+++ b/testsuite/tests/warnings/should_compile/T14794g.hs
@@ -0,0 +1,31 @@
+{-# LANGUAGE PatternSynonyms #-}
+{-# OPTIONS_GHC -Wmissing-pattern-synonym-signatures #-}
+
+module T14794g (test1, pattern Test2, test3, pattern Test4) where
+
+-- This should generate warnings with;
+-- -Wmissing-pattern-synonym-signatures
+
+pattern Test4 <- True
+
+pattern Test8 <- True
+
+
+-- This should not generate warnings with;
+-- -Wmissing-pattern-synonym-signatures
+
+test1 :: Bool
+test1 = True
+
+pattern Test2 :: Bool
+pattern Test2 <- True
+
+test3 = True
+
+test5 :: Bool
+test5 = True
+
+pattern Test6 :: Bool
+pattern Test6 <- True
+
+test7 = True
diff --git a/testsuite/tests/warnings/should_compile/T14794g.stderr b/testsuite/tests/warnings/should_compile/T14794g.stderr
new file mode 100644
index 0000000000..abd3bf205d
--- /dev/null
+++ b/testsuite/tests/warnings/should_compile/T14794g.stderr
@@ -0,0 +1,6 @@
+
+T14794g.hs:9:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)]
+ Pattern synonym with no type signature: pattern Test4 :: Bool
+
+T14794g.hs:11:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)]
+ Pattern synonym with no type signature: pattern Test8 :: Bool
diff --git a/testsuite/tests/warnings/should_compile/T2526.hs b/testsuite/tests/warnings/should_compile/T2526.hs
deleted file mode 100644
index c77168c73b..0000000000
--- a/testsuite/tests/warnings/should_compile/T2526.hs
+++ /dev/null
@@ -1,7 +0,0 @@
-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
deleted file mode 100644
index b433f0e71d..0000000000
--- a/testsuite/tests/warnings/should_compile/T2526.stderr
+++ /dev/null
@@ -1,3 +0,0 @@
-
-T2526.hs:4:1: warning: [-Wmissing-exported-signatures]
- 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 de46efcf1f..7e8668c8d8 100644
--- a/testsuite/tests/warnings/should_compile/all.T
+++ b/testsuite/tests/warnings/should_compile/all.T
@@ -1,5 +1,11 @@
-# -fwarn-missing-exported-signatures should take precedence over -fwarn-missing-signatures
-test('T2526', normal, compile, ['-fwarn-missing-signatures -fwarn-missing-exported-signatures'])
+test('T14794a', normal, compile, [''])
+test('T14794b', normal, compile, [''])
+test('T14794c', normal, compile, [''])
+test('T14794d', normal, compile, [''])
+test('T14794e', normal, compile, [''])
+test('T14794f', normal, compile, [''])
+test('T14794g', normal, compile, [''])
+
test('T9178', [], multimod_compile, ['T9178', '-Wall'])
# T9230.hs contains a tab character. Test that -Wtabs is enabled by default.