summaryrefslogtreecommitdiff
path: root/testsuite/tests/gadt/gadt19.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/gadt/gadt19.hs')
-rw-r--r--testsuite/tests/gadt/gadt19.hs16
1 files changed, 16 insertions, 0 deletions
diff --git a/testsuite/tests/gadt/gadt19.hs b/testsuite/tests/gadt/gadt19.hs
new file mode 100644
index 0000000000..34b0d291b5
--- /dev/null
+++ b/testsuite/tests/gadt/gadt19.hs
@@ -0,0 +1,16 @@
+{-# LANGUAGE GADTs #-}
+
+-- Involves an equality that is not an existential
+
+module Foo2 where
+
+data T t a where
+ T :: a -> T () a
+
+foo :: (a -> a) -> T t a -> T t a
+foo f (T x) = T (f x)
+
+bar :: T t Int -> T t Int
+bar t@(T _) = foo (+1) t
+
+