diff --git a/ghc/lib/concurrent/Merge.lhs b/ghc/lib/concurrent/Merge.lhs index 322d2aa2d10893005de0ef283c81c54b3f55cae2..f95678edd1c288396bd9c1a6d416a3c108d5189d 100644 --- a/ghc/lib/concurrent/Merge.lhs +++ b/ghc/lib/concurrent/Merge.lhs @@ -15,7 +15,9 @@ module Merge ) where import Semaphore - +import ConcBase +import STBase ( unsafeInterleavePrimIO ) +import IOBase max_buff_size = 1 @@ -64,7 +66,7 @@ suckIO branches_running buff@(tail_list,e) vs unsafeInterleavePrimIO ( ioToPrimIO $ takeMVar next_node >>= \ x -> signalQSem e >> - return x) `stThen` \ next_node_val -> + return x) `thenIO_Prim` \ next_node_val -> putMVar node (x:next_node_val) >> putMVar tail_list next_node >> suckIO branches_running buff xs diff --git a/ghc/lib/concurrent/Parallel.lhs b/ghc/lib/concurrent/Parallel.lhs index 79609ad209b931a01e290b4fdba639c5d5b01569..2c068e64627603ef677d5c84ad971664cfc5c084 100644 --- a/ghc/lib/concurrent/Parallel.lhs +++ b/ghc/lib/concurrent/Parallel.lhs @@ -13,6 +13,9 @@ module Parallel (par, seq -- re-exported import ConcBase ( par ) #if defined(__GRANSIM__) +import PrelBase +import GHCerr ( parError ) +import GHC ( parGlobal#, parLocal#, parAt#, parAtForNow# ) {-# INLINE parGlobal #-} parGlobal :: Int -> Int -> Int -> Int -> a -> b -> b