diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2016-08-12 15:52:07 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2016-08-12 17:34:12 +0100 |
commit | ac0e11252af149f085e2262200b7a1638b4a1553 (patch) | |
tree | 9001e3efcb0520338c0c9d1a38eb159c8ad1c3d4 /testsuite/tests/patsyn | |
parent | 9684dbb1d776a8e086f8db4191b3bcf826867dda (diff) | |
download | haskell-ac0e11252af149f085e2262200b7a1638b4a1553.tar.gz |
Improve missing-sig warning
Fixes Trac #12484
Diffstat (limited to 'testsuite/tests/patsyn')
-rw-r--r-- | testsuite/tests/patsyn/should_compile/T11213.stderr | 53 | ||||
-rw-r--r-- | testsuite/tests/patsyn/should_compile/T12484.hs | 7 | ||||
-rw-r--r-- | testsuite/tests/patsyn/should_compile/T12484.stderr | 4 | ||||
-rw-r--r-- | testsuite/tests/patsyn/should_compile/all.T | 3 | ||||
-rw-r--r-- | testsuite/tests/patsyn/should_fail/T11053.stderr | 18 |
5 files changed, 51 insertions, 34 deletions
diff --git a/testsuite/tests/patsyn/should_compile/T11213.stderr b/testsuite/tests/patsyn/should_compile/T11213.stderr index 72f67e3a26..9c438dd176 100644 --- a/testsuite/tests/patsyn/should_compile/T11213.stderr +++ b/testsuite/tests/patsyn/should_compile/T11213.stderr @@ -1,46 +1,51 @@ T11213.hs:19:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)] - Top-level binding with no type signature: P :: Bool + Pattern synonym with no type signature: pattern P :: Bool T11213.hs:20:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)] - Top-level binding with no type signature: - Pe :: () => forall a. a -> Ex + Pattern synonym with no type signature: + pattern Pe :: () => forall a. a -> Ex T11213.hs:21:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)] - Top-level binding with no type signature: Pu :: forall t. t -> t + Pattern synonym with no type signature: + pattern Pu :: forall t. t -> t T11213.hs:22:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)] - Top-level binding with no type signature: - Pue :: forall a. () => forall a1. a -> a1 -> (a, Ex) + Pattern synonym with no type signature: + pattern Pue :: forall a. () => forall a1. a -> a1 -> (a, Ex) T11213.hs:23:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)] - Top-level binding with no type signature: - Pur :: forall a. (Num a, Eq a) => a -> [a] + Pattern synonym with no type signature: + pattern Pur :: forall a. (Num a, Eq a) => a -> [a] T11213.hs:24:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)] - Top-level binding with no type signature: - Purp :: forall a a1. - (Num a1, Eq a1) => - Show a => a1 -> a -> ([a1], UnivProv a) + Pattern synonym with no type signature: + pattern Purp :: forall a a1. + (Num a1, Eq a1) => + Show a => a1 -> a -> ([a1], UnivProv a) T11213.hs:25:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)] - Top-level binding with no type signature: - Pure :: forall a. (Num a, Eq a) => forall a1. a -> a1 -> ([a], Ex) + Pattern synonym with no type signature: + pattern Pure :: forall a. + (Num a, Eq a) => + forall a1. a -> a1 -> ([a], Ex) T11213.hs:26:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)] - Top-level binding with no type signature: - Purep :: forall a. - (Num a, Eq a) => - forall a1. Show a1 => a -> a1 -> ([a], ExProv) + Pattern synonym with no type signature: + pattern Purep :: forall a. + (Num a, Eq a) => + forall a1. Show a1 => a -> a1 -> ([a], ExProv) T11213.hs:27:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)] - Top-level binding with no type signature: - Pep :: () => forall a. Show a => a -> ExProv + Pattern synonym with no type signature: + pattern Pep :: () => forall a. Show a => a -> ExProv T11213.hs:28:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)] - Top-level binding with no type signature: - Pup :: forall a. () => Show a => a -> UnivProv a + Pattern synonym with no type signature: + pattern Pup :: forall a. () => Show a => a -> UnivProv a T11213.hs:29:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)] - Top-level binding with no type signature: - Puep :: forall b. () => forall a. Show a => a -> b -> (ExProv, b) + Pattern synonym with no type signature: + pattern Puep :: forall b. + () => + forall a. Show a => a -> b -> (ExProv, b) diff --git a/testsuite/tests/patsyn/should_compile/T12484.hs b/testsuite/tests/patsyn/should_compile/T12484.hs new file mode 100644 index 0000000000..833ac8cb33 --- /dev/null +++ b/testsuite/tests/patsyn/should_compile/T12484.hs @@ -0,0 +1,7 @@ +{-# OPTIONS_GHC -Wmissing-pattern-synonym-signatures #-} +{-# LANGUAGE PatternSynonyms #-} + +module T12484 where + +pattern RP x = (x, True) + diff --git a/testsuite/tests/patsyn/should_compile/T12484.stderr b/testsuite/tests/patsyn/should_compile/T12484.stderr new file mode 100644 index 0000000000..d51b6fe393 --- /dev/null +++ b/testsuite/tests/patsyn/should_compile/T12484.stderr @@ -0,0 +1,4 @@ + +T12484.hs:6:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)] + Pattern synonym with no type signature: + pattern RP :: forall a. a -> (a, Bool) diff --git a/testsuite/tests/patsyn/should_compile/all.T b/testsuite/tests/patsyn/should_compile/all.T index f29e56e790..78320c7713 100644 --- a/testsuite/tests/patsyn/should_compile/all.T +++ b/testsuite/tests/patsyn/should_compile/all.T @@ -56,4 +56,5 @@ test('T11727', normal, compile, ['']) test('T11959', expect_broken(11959), multimod_compile, ['T11959', '-v0']) test('T12094', normal, compile, ['']) test('T11977', normal, compile, ['']) -test('T12108', normal, compile, [''])
\ No newline at end of file +test('T12108', normal, compile, ['']) +test('T12484', normal, compile, ['']) diff --git a/testsuite/tests/patsyn/should_fail/T11053.stderr b/testsuite/tests/patsyn/should_fail/T11053.stderr index 40dae30ba1..5e50a9143f 100644 --- a/testsuite/tests/patsyn/should_fail/T11053.stderr +++ b/testsuite/tests/patsyn/should_fail/T11053.stderr @@ -1,19 +1,19 @@ T11053.hs:7:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)] - Top-level binding with no type signature: T :: Bool + Pattern synonym with no type signature: pattern T :: Bool T11053.hs:9:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)] - Top-level binding with no type signature: - J :: forall a. a -> Maybe a + Pattern synonym with no type signature: + pattern J :: forall a. a -> Maybe a T11053.hs:11:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)] - Top-level binding with no type signature: - J1 :: forall a. a -> Maybe a + Pattern synonym with no type signature: + pattern J1 :: forall a. a -> Maybe a T11053.hs:13:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)] - Top-level binding with no type signature: - J2 :: forall a. a -> Maybe a + Pattern synonym with no type signature: + pattern J2 :: forall a. a -> Maybe a T11053.hs:15:1: warning: [-Wmissing-pattern-synonym-signatures (in -Wall)] - Top-level binding with no type signature: - J3 :: forall a. a -> Maybe a + Pattern synonym with no type signature: + pattern J3 :: forall a. a -> Maybe a |