[commit: testsuite] master: Test Trac #5455 (86b3aaa)

Simon Peyton Jones simonpj at microsoft.com
Mon Sep 5 18:33:24 CEST 2011


Repository : ssh://darcs.haskell.org//srv/darcs/testsuite

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/86b3aaa8b6d8d38aaf73c3f8835b561fc7fbfaaf

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

commit 86b3aaa8b6d8d38aaf73c3f8835b561fc7fbfaaf
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Mon Sep 5 16:59:33 2011 +0100

    Test Trac #5455

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

 tests/deSugar/should_compile/T5455.hs     |   10 ++++++++++
 tests/deSugar/should_compile/T5455.stderr |    8 ++++++++
 tests/deSugar/should_compile/all.T        |    1 +
 3 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/tests/deSugar/should_compile/T5455.hs b/tests/deSugar/should_compile/T5455.hs
new file mode 100644
index 0000000..fa1e7f2
--- /dev/null
+++ b/tests/deSugar/should_compile/T5455.hs
@@ -0,0 +1,10 @@
+{-# OPTIONS_GHC -fwarn-incomplete-uni-patterns #-}
+module T5455 where
+
+-- We should get just one error message for each defn
+
+w :: String -> String
+w x = let (_:_) = x in "1"
+
+w2 :: String -> String
+w2 x2 = let (_a:_b) = x2 in "1"
diff --git a/tests/deSugar/should_compile/T5455.stderr b/tests/deSugar/should_compile/T5455.stderr
new file mode 100644
index 0000000..adeae80
--- /dev/null
+++ b/tests/deSugar/should_compile/T5455.stderr
@@ -0,0 +1,8 @@
+
+T5455.hs:7:11:
+    Warning: Pattern match(es) are non-exhaustive
+             In a pattern binding: Patterns not matched: []
+
+T5455.hs:10:13:
+    Warning: Pattern match(es) are non-exhaustive
+             In a pattern binding: Patterns not matched: []
diff --git a/tests/deSugar/should_compile/all.T b/tests/deSugar/should_compile/all.T
index 0db20f9..40a4c24 100644
--- a/tests/deSugar/should_compile/all.T
+++ b/tests/deSugar/should_compile/all.T
@@ -88,3 +88,4 @@ test('T5252',
      extra_clean(['T5252a.hi', 'T5252a.o']),
      run_command, 
      ['$MAKE -s --no-print-directory T5252'])
+test('T5455', normal, compile, [''])





More information about the Cvs-ghc mailing list