summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-regress/typecheck/should_run/tcrun035.hs
blob: ee9f27bb7b57334f11c2ddd76d60014a388f38b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{-# LANGUAGE Rank2Types #-}

-- Tests subsumption for infix operators (in this case (.))
-- Broke GHC 6.4!

-- Now it breaks the impredicativity story
--   (id {a}) . (id {a}) :: a -> a
-- And (forall m. Monad m => m a) /~ IO a

module Main(main) where

foo :: (forall m. Monad m => m a) -> IO a
foo = id . id

main :: IO ()
main = foo (return ())