Commit def84a10 authored by Ben Gamari's avatar Ben Gamari 🐢

testsuite: Add tests from #11982

parent dc6fd390
{-# LANGUAGE MonadComprehensions, ParallelListComp #-}
module Foo where
foo xs ys = [ (f y True, f x 'c')
| let f _ z = z, x <- xs
| y <- ys ]
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ApplicativeDo #-}
module Main where
import Control.Concurrent.MVar
type Locker = forall a. IO a -> IO a
main :: IO ()
main = do
line <- getLine
lock <- newMVar ()
let locker :: Locker
locker = withMVar lock . const
f line locker
f :: String -> Locker -> IO ()
f line locker = locker $ putStrLn line
-- This is similar to T11982b but 'locker' inlined which allows the module to
-- compile.
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ApplicativeDo #-}
module Main where
import Control.Concurrent.MVar
type Locker = forall a. IO a -> IO a
main :: IO ()
main = do
line <- getLine
lock <- newMVar ()
f line $ withMVar lock . const
f :: String -> Locker -> IO ()
f line locker = locker $ putStrLn line
......@@ -511,6 +511,9 @@ test('T11811', normal, compile, [''])
test('T11793', normal, compile, [''])
test('T11348', normal, compile, [''])
test('T11947', normal, compile, [''])
test('T11982a', expect_broken(11982), compile, [''])
test('T11982b', expect_broken(11982), compile, [''])
test('T11982c', normal, compile, [''])
test('T12045a', normal, compile, [''])
test('T12064', [], multimod_compile, ['T12064', '-v0'])
test('ExPat', normal, compile, [''])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment