summaryrefslogtreecommitdiff
path: root/testsuite/tests/boxy/T2193.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/boxy/T2193.hs')
-rw-r--r--testsuite/tests/boxy/T2193.hs13
1 files changed, 13 insertions, 0 deletions
diff --git a/testsuite/tests/boxy/T2193.hs b/testsuite/tests/boxy/T2193.hs
new file mode 100644
index 0000000000..904a13721c
--- /dev/null
+++ b/testsuite/tests/boxy/T2193.hs
@@ -0,0 +1,13 @@
+{-# OPTIONS_GHC -XImpredicativeTypes -fno-warn-deprecated-flags #-}
+
+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)))
+