summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/TypeRepCon.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/TypeRepCon.hs')
-rw-r--r--testsuite/tests/typecheck/should_compile/TypeRepCon.hs13
1 files changed, 13 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/TypeRepCon.hs b/testsuite/tests/typecheck/should_compile/TypeRepCon.hs
new file mode 100644
index 0000000000..37e9bfc00b
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/TypeRepCon.hs
@@ -0,0 +1,13 @@
+{-# LANGUAGE PatternSynonyms #-}
+
+module TypeRepCon1 where
+
+import Type.Reflection
+ ( TypeRep, pattern Con )
+
+-- Simple test of the 'NotApplication' custom type error
+-- in Data.Typeable.Internal.
+
+isApp :: TypeRep (f a) -> Bool
+isApp (Con _) = False -- Should warn about redundant pattern (insoluble Given)
+isApp _ = True