summaryrefslogtreecommitdiff
path: root/testsuite/tests/pmcheck
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2015-12-31 14:32:27 +0000
committerSimon Peyton Jones <simonpj@microsoft.com>2015-12-31 14:44:00 +0000
commit70eefbc21649b11cd0ea1b779df316fc93d84a59 (patch)
tree20e915262b79756025fcade7e5d5f5b7d971df7c /testsuite/tests/pmcheck
parent5ba3caa2a722d4de5b7886550956e0294e170523 (diff)
downloadhaskell-70eefbc21649b11cd0ea1b779df316fc93d84a59.tar.gz
Test Trac #11245
Diffstat (limited to 'testsuite/tests/pmcheck')
-rw-r--r--testsuite/tests/pmcheck/should_compile/T11245.hs13
-rw-r--r--testsuite/tests/pmcheck/should_compile/T11245.stderr4
-rw-r--r--testsuite/tests/pmcheck/should_compile/all.T1
3 files changed, 18 insertions, 0 deletions
diff --git a/testsuite/tests/pmcheck/should_compile/T11245.hs b/testsuite/tests/pmcheck/should_compile/T11245.hs
new file mode 100644
index 0000000000..1f5c0fcaa0
--- /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 0000000000..184029a274
--- /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 9278fde53e..292e9af26f 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'])