diff --git a/ghc/tests/concurrent/should_run/conc001.hs b/ghc/tests/concurrent/should_run/conc001.hs index 8f7f3fef7b41cd841f1a1516956f32441e8e8ccd..0468727a76204cd020dec08b3030d0067a90358c 100644 --- a/ghc/tests/concurrent/should_run/conc001.hs +++ b/ghc/tests/concurrent/should_run/conc001.hs @@ -7,9 +7,9 @@ import Concurrent main = do s <- newEmptyMVar let - reader = do - str <- takeMVar s - putStr str + write = do + putMVar s "hello world\n" - forkIO reader - putMVar s "hello world\n" + forkIO write + str <- takeMVar s + putStr str diff --git a/ghc/tests/concurrent/should_run/conc002.hs b/ghc/tests/concurrent/should_run/conc002.hs index 4e876f89548cd409ad7691b90d0cbdf57ba7a640..7008802e8d7ff21fbaad004141acd4feaeb31048 100644 --- a/ghc/tests/concurrent/should_run/conc002.hs +++ b/ghc/tests/concurrent/should_run/conc002.hs @@ -4,12 +4,11 @@ import Concurrent main = do c <- newChan - let - reader = do - char <- readChan c - if (char == '\n') - then return () - else do putChar char; reader - forkIO reader - writeList2Chan c "Hello World\n" + let writer = writeList2Chan c "Hello World\n" + forkIO writer + let reader = do char <- readChan c + if (char == '\n') + then return () + else do putChar char; reader + reader