summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/pmcheck/should_compile/T15385.hs21
-rw-r--r--testsuite/tests/pmcheck/should_compile/all.T10
2 files changed, 27 insertions, 4 deletions
diff --git a/testsuite/tests/pmcheck/should_compile/T15385.hs b/testsuite/tests/pmcheck/should_compile/T15385.hs
new file mode 100644
index 0000000000..dedf6c1553
--- /dev/null
+++ b/testsuite/tests/pmcheck/should_compile/T15385.hs
@@ -0,0 +1,21 @@
+{-# LANGUAGE GADTs #-}
+{-# LANGUAGE MultiWayIf #-}
+{-# LANGUAGE TypeOperators #-}
+{-# OPTIONS_GHC -Wincomplete-patterns #-}
+module T15385 where
+
+import Data.Type.Equality
+
+data T a where
+ TInt :: T Int
+ TBool :: T Bool
+
+f1, f2 :: a :~: Int -> T a -> ()
+f1 eq t
+ | Refl <- eq
+ = case t of
+ TInt -> ()
+f2 eq t
+ = if | Refl <- eq
+ -> case t of
+ TInt -> ()
diff --git a/testsuite/tests/pmcheck/should_compile/all.T b/testsuite/tests/pmcheck/should_compile/all.T
index e382e3fda4..4030b0609a 100644
--- a/testsuite/tests/pmcheck/should_compile/all.T
+++ b/testsuite/tests/pmcheck/should_compile/all.T
@@ -44,25 +44,27 @@ test('T11276', compiler_stats_num_field('bytes allocated',
test('T11303b', compiler_stats_num_field('bytes allocated',
[(wordsize(64), 54373936, 10)]
- # 2018-07-14: 54373936 INITIAL
+ # 2018-07-14: 54373936 INITIAL
), compile, ['-fwarn-incomplete-patterns -fwarn-overlapping-patterns +RTS -M1G -RTS'])
-
+
test('T11374', compiler_stats_num_field('bytes allocated',
[(wordsize(64), 280144864, 10)]
# 2018-07-14: 280144864 INITIAL
), compile, ['-fwarn-incomplete-patterns -fwarn-overlapping-patterns +RTS -M1G -RTS'])
-
+
test('T11195', compiler_stats_num_field('bytes allocated',
[(wordsize(64), 7852567480, 10)]
# 2018-07-14: 7852567480 INITIAL
), compile, ['-package ghc -fwarn-incomplete-patterns -fwarn-overlapping-patterns +RTS -M2G -RTS'])
-
+
test('T11984', normal, compile,
['-fwarn-incomplete-patterns -fwarn-overlapping-patterns'])
test('T14086', normal, compile,
['-fwarn-incomplete-patterns -fwarn-overlapping-patterns'])
test('T14098', normal, compile,
['-fwarn-incomplete-patterns -fwarn-overlapping-patterns'])
+test('T15385', normal, compile,
+ ['-fwarn-incomplete-patterns -fwarn-overlapping-patterns'])
# Other tests
test('pmc001', [], compile,