diff options
Diffstat (limited to 'testsuite/tests/deSugar/should_compile')
4 files changed, 15 insertions, 3 deletions
diff --git a/testsuite/tests/deSugar/should_compile/DsStrictWarn.hs b/testsuite/tests/deSugar/should_compile/DsStrictWarn.hs new file mode 100644 index 0000000000..81b337d05b --- /dev/null +++ b/testsuite/tests/deSugar/should_compile/DsStrictWarn.hs @@ -0,0 +1,7 @@ +{-# OPTIONS_GHC -fwarn-incomplete-uni-patterns #-} +{-# LANGUAGE Strict #-} +module DsStrictWarn where + +-- should warn about non-exhaustive pattern match +w :: String -> String +w x = let (_:_) = x in "1" diff --git a/testsuite/tests/deSugar/should_compile/DsStrictWarn.stderr b/testsuite/tests/deSugar/should_compile/DsStrictWarn.stderr new file mode 100644 index 0000000000..974e51c38c --- /dev/null +++ b/testsuite/tests/deSugar/should_compile/DsStrictWarn.stderr @@ -0,0 +1,4 @@ + +DsStrictWarn.hs:7:11: warning: + Pattern match(es) are non-exhaustive + In a pattern binding: Patterns not matched: [] diff --git a/testsuite/tests/deSugar/should_compile/T5455.hs b/testsuite/tests/deSugar/should_compile/T5455.hs index b6d44b8bcb..26c1a79384 100644 --- a/testsuite/tests/deSugar/should_compile/T5455.hs +++ b/testsuite/tests/deSugar/should_compile/T5455.hs @@ -1,7 +1,7 @@ {-# OPTIONS_GHC -fwarn-incomplete-uni-patterns #-} module T5455 where --- No error message for this one: +-- No error message for this one: -- the pattern will never be demanded w :: String -> String diff --git a/testsuite/tests/deSugar/should_compile/all.T b/testsuite/tests/deSugar/should_compile/all.T index 543e01e8b3..c6b024f1b9 100644 --- a/testsuite/tests/deSugar/should_compile/all.T +++ b/testsuite/tests/deSugar/should_compile/all.T @@ -84,7 +84,7 @@ test('T4870', test('T5117', normal, compile, ['']) test('T5252', extra_clean(['T5252a.hi', 'T5252a.o']), - run_command, + run_command, ['$MAKE -s --no-print-directory T5252']) test('T5455', normal, compile, ['']) test('T5001', @@ -96,10 +96,11 @@ test('T5001', # T5252Take2 failed when compiled *wihtout* optimisation test('T5252Take2', extra_clean(['T5252Take2a.hi', 'T5252Take2a.o']), - run_command, + run_command, ['$MAKE -s --no-print-directory T5252Take2']) test('T2431', normal, compile, ['-ddump-simpl -dsuppress-uniques']) test('T7669', normal, compile, ['']) test('T8470', normal, compile, ['']) test('T10251', normal, compile, ['']) test('T10767', normal, compile, ['']) +test('DsStrictWarn', normal, compile, ['']) |