[project @ 1997-07-05 01:01:11 by sof]
authorsof <unknown>
Sat, 5 Jul 1997 01:02:40 +0000 (01:02 +0000)
committersof <unknown>
Sat, 5 Jul 1997 01:02:40 +0000 (01:02 +0000)
Use UnsafeST

ghc/lib/concurrent/Channel.lhs
ghc/lib/concurrent/Merge.lhs
ghc/lib/ghc/IOBase.lhs
ghc/lib/ghc/IOHandle.lhs
ghc/lib/ghc/PrelNum.lhs

index 2d0c935..417e139 100644 (file)
@@ -30,6 +30,7 @@ import Prelude
 import IOBase  ( IO(..) )              -- Suspicious!
 import ConcBase
 import STBase
+import UnsafeST ( unsafeInterleavePrimIO )
 \end{code}
 
 A channel is represented by two @MVar@s keeping track of the two ends
index f95678e..3f79413 100644 (file)
@@ -16,7 +16,7 @@ module Merge
 
 import Semaphore
 import ConcBase
-import STBase  ( unsafeInterleavePrimIO )
+import UnsafeST  ( unsafeInterleavePrimIO )
 import IOBase
 
 max_buff_size = 1
index 1d7688b..d2fdd3b 100644 (file)
@@ -14,13 +14,15 @@ concretely; the @IO@ module itself exports abstractly.
 module IOBase where
 
 import STBase
+import UnsafeST
 import PrelTup
 import Foreign
 import PackedString    ( unpackCString )
 import PrelBase
+import ArrBase ( ByteArray(..), MutableVar(..) )
 import PrelRead
+
 import GHC
-import ArrBase ( ByteArray(..), MutableVar(..) )
 
 infixr 1 `thenIO_Prim`, `seqIO_Prim`
 \end{code}
@@ -141,6 +143,8 @@ errorIO (ST io)
   where
     bottom = bottom -- Never evaluated
 
+--errorIO x = (waitRead#, errorIO#, makeForeignObj#, waitWrite#, (+#))
+
 -- error stops execution and displays an error message
 error :: String -> a
 error s = error__ ( \ x -> _ccall_ ErrorHdrHook x ) s
index b3b145f..c367403 100644 (file)
@@ -15,6 +15,7 @@ which are supported for them.
 module IOHandle where
 
 import ST
+import UnsafeST
 import STBase
 import ArrBase ( ByteArray(..) )
 import PrelRead        ( Read )
index e329d74..6cf3dcd 100644 (file)
@@ -25,7 +25,7 @@ import {-# SOURCE #-} IOBase  ( error )
 import PrelList
 
 import ArrBase ( Array, array, (!) )
-import STBase   ( unsafePerformPrimIO )
+import UnsafeST ( unsafePerformPrimIO )
 import Ix      ( Ix(..) )
 import Foreign ()              -- This import tells the dependency analyser to compile Foreign first.
                                -- There's an implicit dependency on Foreign because the ccalls in