summaryrefslogtreecommitdiff
path: root/testsuite/tests/impredicative/T2193.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/impredicative/T2193.hs')
-rw-r--r--testsuite/tests/impredicative/T2193.hs15
1 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/impredicative/T2193.hs b/testsuite/tests/impredicative/T2193.hs
new file mode 100644
index 0000000000..dee542c65c
--- /dev/null
+++ b/testsuite/tests/impredicative/T2193.hs
@@ -0,0 +1,15 @@
+{-# LANGUAGE ImpredicativeTypes #-}
+
+-- Sept 16: now scraping through with -XImpredicateTypes
+
+module Main where
+
+data Foo x y = Foo {foo1 :: x, foo2 :: y}
+instance Functor (Foo x) where
+ fmap f (Foo x y) = Foo x (f y)
+
+bar :: a -> Foo (forall s. s) a
+bar a = Foo undefined a
+
+main = print (foo2 (fmap (*2) (bar 2)))
+