hadrian: Add support for bindist compressors other than Xz
[ghc.git] / testsuite / tests / typecheck / should_compile / T11982c.hs
1 -- This is similar to T11982b but 'locker' inlined which allows the module to
2 -- compile.
3
4 {-# LANGUAGE RankNTypes #-}
5 {-# LANGUAGE ApplicativeDo #-}
6 module Main where
7 import Control.Concurrent.MVar
8
9 type Locker = forall a. IO a -> IO a
10
11 main :: IO ()
12 main = do
13 line <- getLine
14 lock <- newMVar ()
15 f line $ withMVar lock . const
16
17 f :: String -> Locker -> IO ()
18 f line locker = locker $ putStrLn line