summaryrefslogtreecommitdiff
path: root/testsuite/tests/pmcheck/should_compile/T3927.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/pmcheck/should_compile/T3927.hs')
-rw-r--r--testsuite/tests/pmcheck/should_compile/T3927.hs13
1 files changed, 13 insertions, 0 deletions
diff --git a/testsuite/tests/pmcheck/should_compile/T3927.hs b/testsuite/tests/pmcheck/should_compile/T3927.hs
new file mode 100644
index 0000000000..f1ec01ee7f
--- /dev/null
+++ b/testsuite/tests/pmcheck/should_compile/T3927.hs
@@ -0,0 +1,13 @@
+{-# LANGUAGE GADTs #-}
+{-# OPTIONS_GHC -fwarn-incomplete-patterns -fwarn-overlapping-patterns #-}
+
+module T3927 where
+
+data T a where
+ T1 :: T Int
+ T2 :: T Bool
+
+-- f1 is exhaustive
+f1 :: T a -> T a -> Bool
+f1 T1 T1 = True
+f1 T2 T2 = False