[commit: ghc] master: Test Trac #11245 (70eefbc)
git at git.haskell.org
git at git.haskell.org
Thu Dec 31 14:45:41 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/70eefbc21649b11cd0ea1b779df316fc93d84a59/ghc
>---------------------------------------------------------------
commit 70eefbc21649b11cd0ea1b779df316fc93d84a59
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Thu Dec 31 14:32:27 2015 +0000
Test Trac #11245
>---------------------------------------------------------------
70eefbc21649b11cd0ea1b779df316fc93d84a59
testsuite/tests/pmcheck/should_compile/T11245.hs | 13 +++++++++++++
testsuite/tests/pmcheck/should_compile/T11245.stderr | 4 ++++
testsuite/tests/pmcheck/should_compile/all.T | 1 +
3 files changed, 18 insertions(+)
diff --git a/testsuite/tests/pmcheck/should_compile/T11245.hs b/testsuite/tests/pmcheck/should_compile/T11245.hs
new file mode 100644
index 0000000..1f5c0fc
--- /dev/null
+++ b/testsuite/tests/pmcheck/should_compile/T11245.hs
@@ -0,0 +1,13 @@
+module T11245 where
+
+
+foo x = do
+ let a | Just i <- x
+ , odd i
+ = True
+
+ | Nothing <- x
+ = False
+
+ print x
+ print a
diff --git a/testsuite/tests/pmcheck/should_compile/T11245.stderr b/testsuite/tests/pmcheck/should_compile/T11245.stderr
new file mode 100644
index 0000000..184029a
--- /dev/null
+++ b/testsuite/tests/pmcheck/should_compile/T11245.stderr
@@ -0,0 +1,4 @@
+
+T11245.hs:5:7: warning:
+ Pattern match(es) are non-exhaustive
+ In an equation for ‘a’: Guards do not cover entire pattern space
diff --git a/testsuite/tests/pmcheck/should_compile/all.T b/testsuite/tests/pmcheck/should_compile/all.T
index 9278fde..292e9af 100644
--- a/testsuite/tests/pmcheck/should_compile/all.T
+++ b/testsuite/tests/pmcheck/should_compile/all.T
@@ -32,3 +32,4 @@ test('pmc004', only_compiler_types(['ghc']), compile, ['-fwarn-incomplete-patter
test('pmc005', only_compiler_types(['ghc']), compile, ['-fwarn-incomplete-patterns -fwarn-overlapping-patterns'])
test('pmc006', only_compiler_types(['ghc']), compile, ['-fwarn-incomplete-patterns -fwarn-overlapping-patterns'])
test('pmc007', only_compiler_types(['ghc']), compile, ['-fwarn-incomplete-patterns -fwarn-overlapping-patterns'])
+test('T11245', only_compiler_types(['ghc']), compile, ['-fwarn-incomplete-patterns -fwarn-overlapping-patterns'])
More information about the ghc-commits
mailing list