summaryrefslogtreecommitdiff
path: root/testsuite/tests/boxy/T2193.hs
blob: 904a13721cfe551c5764fa03926edc2314e3721d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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)))