summaryrefslogtreecommitdiff
path: root/testsuite/tests/gadt/T2151.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/gadt/T2151.hs')
-rw-r--r--testsuite/tests/gadt/T2151.hs13
1 files changed, 13 insertions, 0 deletions
diff --git a/testsuite/tests/gadt/T2151.hs b/testsuite/tests/gadt/T2151.hs
new file mode 100644
index 0000000000..339d231e80
--- /dev/null
+++ b/testsuite/tests/gadt/T2151.hs
@@ -0,0 +1,13 @@
+{-# LANGUAGE GADTs #-}
+
+module T2151 where
+
+data Type a where
+ Func :: Type a -> Type b -> Type (a -> b)
+ PF :: Type a -> Type (PF a)
+
+data PF a where
+ ID :: PF (a -> a)
+
+test :: Type a -> a -> a
+test (PF (Func _ _)) ID = ID