From 3fe02e4c96d027557f3e1a2a2a9d4d47d2899f5b Mon Sep 17 00:00:00 2001
From: simonm <unknown>
Date: Mon, 17 Aug 1998 10:59:01 +0000
Subject: [PATCH] [project @ 1998-08-17 10:59:01 by simonm] Update tests now
 that the death of the main thread ends the program.

---
 ghc/tests/concurrent/should_run/conc001.hs | 10 +++++-----
 ghc/tests/concurrent/should_run/conc002.hs | 15 +++++++--------
 2 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/ghc/tests/concurrent/should_run/conc001.hs b/ghc/tests/concurrent/should_run/conc001.hs
index 8f7f3fef7b41..0468727a7620 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 4e876f89548c..7008802e8d7f 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
 
-- 
GitLab