projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 1999-01-27 10:55:39 by simonm]
[ghc-hetmet.git]
/
ghc
/
lib
/
concurrent
/
Merge.lhs
diff --git
a/ghc/lib/concurrent/Merge.lhs
b/ghc/lib/concurrent/Merge.lhs
index
f95678e
..
706f0e6
100644
(file)
--- a/
ghc/lib/concurrent/Merge.lhs
+++ b/
ghc/lib/concurrent/Merge.lhs
@@
-10,14
+10,13
@@
IO monad.
module Merge
(
module Merge
(
- mergeIO, --:: [a] -> [a] -> IO [a]
- nmergeIO --:: [[a]] -> IO [a]
+ mergeIO, -- :: [a] -> [a] -> IO [a]
+ nmergeIO -- :: [[a]] -> IO [a]
) where
import Semaphore
) where
import Semaphore
-import ConcBase
-import STBase ( unsafeInterleavePrimIO )
-import IOBase
+import PrelConc
+import PrelIOBase
max_buff_size = 1
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 ->
waitQSem e >>
takeMVar tail_list >>= \ node ->
newEmptyMVar >>= \ next_node ->
- unsafeInterleavePrimIO ( ioToPrimIO $
+ unsafeInterleaveIO (
takeMVar next_node >>= \ x ->
signalQSem e >>
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
putMVar node (x:next_node_val) >>
putMVar tail_list next_node >>
suckIO branches_running buff xs