[commit: ghc] ghc-8.0: Test wibbles for commit 03541cba (e284872)

git at git.haskell.org git at git.haskell.org
Sun Sep 18 17:00:59 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : ghc-8.0
Link       : http://ghc.haskell.org/trac/ghc/changeset/e284872899c53f1d389a55ad3a6547fbfcce6909/ghc

>---------------------------------------------------------------

commit e284872899c53f1d389a55ad3a6547fbfcce6909
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Mon Sep 12 22:21:15 2016 +0100

    Test wibbles for commit 03541cba
    
    I must have failed to validate properly, sorry.
    These testsuite wibbles belong with
    
      commit 03541cbae50f0d1cdf99120ab88698f29a278159
      Author: Simon Peyton Jones <simonpj at microsoft.com>
      Date:   Fri Sep 9 17:42:42 2016 +0100
    
          Be less picky about reporing inaccessible code
    
    (cherry picked from commit 5eeabe250a1de456f70af07bd3f507a32cb8e10e)


>---------------------------------------------------------------

e284872899c53f1d389a55ad3a6547fbfcce6909
 testsuite/tests/typecheck/should_fail/FDsFromGivens.hs     | 5 ++++-
 testsuite/tests/typecheck/should_fail/FDsFromGivens.stderr | 4 ++++
 testsuite/tests/typecheck/should_fail/T10715.hs            | 4 +++-
 testsuite/tests/typecheck/should_fail/T10715.stderr        | 4 ++++
 testsuite/tests/typecheck/should_fail/T8392a.hs            | 2 ++
 testsuite/tests/typecheck/should_fail/T8392a.stderr        | 4 ++++
 6 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/testsuite/tests/typecheck/should_fail/FDsFromGivens.hs b/testsuite/tests/typecheck/should_fail/FDsFromGivens.hs
index 6e1b34d..110199b 100644
--- a/testsuite/tests/typecheck/should_fail/FDsFromGivens.hs
+++ b/testsuite/tests/typecheck/should_fail/FDsFromGivens.hs
@@ -6,7 +6,10 @@ class C a b | a -> b where
    cop :: a -> b -> ()
 
 {- Failing, as it righteously should! It's inaccessible code -}
--- But (c.f. test T5236) we no longer reject this (see Trac #12466)
+-- But (c.f. test T5236) we no longer reject this in the
+-- typechecker (see Trac #12466)
+-- Instead we get a redundant pattern-match warning,
+-- in the post-typechecking pattern-match checks
 g1 :: (C Char [a], C Char Bool) => a -> ()
 g1 x = ()
 
diff --git a/testsuite/tests/typecheck/should_fail/FDsFromGivens.stderr b/testsuite/tests/typecheck/should_fail/FDsFromGivens.stderr
index e69de29..964e4b6 100644
--- a/testsuite/tests/typecheck/should_fail/FDsFromGivens.stderr
+++ b/testsuite/tests/typecheck/should_fail/FDsFromGivens.stderr
@@ -0,0 +1,4 @@
+
+FDsFromGivens.hs:11:1: warning: [-Woverlapping-patterns (in -Wdefault)]
+    Pattern match is redundant
+    In an equation for ‘g1’: g1 x = ...
diff --git a/testsuite/tests/typecheck/should_fail/T10715.hs b/testsuite/tests/typecheck/should_fail/T10715.hs
index c48402f..9e675e2 100644
--- a/testsuite/tests/typecheck/should_fail/T10715.hs
+++ b/testsuite/tests/typecheck/should_fail/T10715.hs
@@ -11,6 +11,8 @@ data X a
 --
 -- But in Trac #12466 we decided to accept contradictory
 -- type signatures, so definition is now accepeted even
--- though you can never call it.
+-- though you can never call it.  Instead we get a
+-- redundant pattern-match warning, in the
+-- post-typechecking pattern-match checks
 doCoerce :: Coercible a (X a) => a -> X a
 doCoerce = coerce
diff --git a/testsuite/tests/typecheck/should_fail/T10715.stderr b/testsuite/tests/typecheck/should_fail/T10715.stderr
index e69de29..10ff2c9 100644
--- a/testsuite/tests/typecheck/should_fail/T10715.stderr
+++ b/testsuite/tests/typecheck/should_fail/T10715.stderr
@@ -0,0 +1,4 @@
+
+T10715.hs:17:1: warning: [-Woverlapping-patterns (in -Wdefault)]
+    Pattern match is redundant
+    In an equation for ‘doCoerce’: doCoerce = ...
diff --git a/testsuite/tests/typecheck/should_fail/T8392a.hs b/testsuite/tests/typecheck/should_fail/T8392a.hs
index 2ae2338..940f8b6 100644
--- a/testsuite/tests/typecheck/should_fail/T8392a.hs
+++ b/testsuite/tests/typecheck/should_fail/T8392a.hs
@@ -5,5 +5,7 @@ module T8392a where
 --
 -- But (Trac #12466) we now don't complain about
 -- contradictory signatures
+-- Instead we get a redundant pattern-match warning,
+-- in the post-typechecking pattern-match checks
 foo :: (Int ~ Bool) => a -> a
 foo x = x
diff --git a/testsuite/tests/typecheck/should_fail/T8392a.stderr b/testsuite/tests/typecheck/should_fail/T8392a.stderr
index e69de29..bfc30e7 100644
--- a/testsuite/tests/typecheck/should_fail/T8392a.stderr
+++ b/testsuite/tests/typecheck/should_fail/T8392a.stderr
@@ -0,0 +1,4 @@
+
+T8392a.hs:11:1: warning: [-Woverlapping-patterns (in -Wdefault)]
+    Pattern match is redundant
+    In an equation for ‘foo’: foo x = ...



More information about the ghc-commits mailing list