[project @ 1999-01-27 10:55:39 by simonm]
[ghc-hetmet.git] / ghc / lib / concurrent / Merge.lhs
index f95678e..706f0e6 100644 (file)
@@ -10,14 +10,13 @@ IO monad.
 module Merge
 
        (
-        mergeIO,       --:: [a]   -> [a] -> IO [a]
-        nmergeIO       --:: [[a]] -> IO [a]
+        mergeIO,       -- :: [a]   -> [a] -> IO [a]
+        nmergeIO       -- :: [[a]] -> IO [a]
        ) where
 
 import Semaphore
-import ConcBase
-import STBase  ( unsafeInterleavePrimIO )
-import IOBase
+import PrelConc
+import PrelIOBase
 
 max_buff_size = 1
 
@@ -63,10 +62,10 @@ suckIO branches_running buff@(tail_list,e) vs
                waitQSem e                       >>
                takeMVar tail_list               >>= \ node ->
                newEmptyMVar                     >>= \ next_node ->
-               unsafeInterleavePrimIO ( ioToPrimIO $
+               unsafeInterleaveIO (
                        takeMVar next_node  >>= \ x ->
                        signalQSem e        >>
-                       return x)           `thenIO_Prim` \ next_node_val ->
+                       return x)                >>= \ next_node_val ->
                putMVar node (x:next_node_val)   >>
                putMVar tail_list next_node      >>
                suckIO branches_running buff xs