summaryrefslogtreecommitdiff
path: root/ghc
diff options
context:
space:
mode:
authorsimonmar <unknown>1999-08-26 13:34:36 +0000
committersimonmar <unknown>1999-08-26 13:34:36 +0000
commiteb1116b3289ccc27606d09262c2eb2b5105700b4 (patch)
tree473b801062bd13fad555451e4e9f8b5218e2aacf /ghc
parent327b1c6e191440424958ade27cdf13476d2912f1 (diff)
downloadhaskell-eb1116b3289ccc27606d09262c2eb2b5105700b4.tar.gz
[project @ 1999-08-26 13:34:36 by simonmar]
threadDelay etc. should be defined in PrelConc.
Diffstat (limited to 'ghc')
-rw-r--r--ghc/lib/std/PrelConc.lhs16
-rw-r--r--ghc/lib/std/PrelHandle.lhs11
2 files changed, 3 insertions, 24 deletions
diff --git a/ghc/lib/std/PrelConc.lhs b/ghc/lib/std/PrelConc.lhs
index 06265f5ad3..56af3f4fa2 100644
--- a/ghc/lib/std/PrelConc.lhs
+++ b/ghc/lib/std/PrelConc.lhs
@@ -194,19 +194,9 @@ specified file descriptor is available for reading (just like select).
@threadWaitWrite@ is similar, but for writing on a file descriptor.
\begin{code}
-{- Not yet -- SDM
threadDelay, threadWaitRead, threadWaitWrite :: Int -> IO ()
-threadDelay (I# x#) = IO $ \ s# ->
- case delay# x# s# of
- s2# -> (# s2#, () #)
-
-threadWaitRead (I# x#) = IO $ \ s# ->
- case waitRead# x# s# of
- s2# -> (# s2#, () #)
-
-threadWaitWrite (I# x#) = IO $ \ s# ->
- case waitWrite# x# s# of
- s2# -> (# s2#, () #)
--}
+threadDelay (I# ms) = IO $ \s -> case delay# ms s of s -> (# s, () #)
+threadWaitRead (I# fd) = IO $ \s -> case waitRead# fd s of s -> (# s, () #)
+threadWaitWrite (I# fd) = IO $ \s -> case waitWrite# fd s of s -> (# s, () #)
\end{code}
diff --git a/ghc/lib/std/PrelHandle.lhs b/ghc/lib/std/PrelHandle.lhs
index 3893a6aed2..5085b9c65a 100644
--- a/ghc/lib/std/PrelHandle.lhs
+++ b/ghc/lib/std/PrelHandle.lhs
@@ -1180,17 +1180,6 @@ mayBlock fo act = do
CCALL(setNonBlockingIOFlag__) fo -- reset file object.
CCALL(setConnNonBlockingIOFlag__) fo -- reset (connected) file object.
return rc
-
--- #ifdef __HUGS__
-threadDelay, threadWaitRead, threadWaitWrite :: Int -> IO ()
-
--- Hugs does actually have the primops needed to implement these
--- but the primops don't actually do anything...
-threadDelay (I# ms) = IO $ \s -> case delay# ms s of s -> (# s, () #)
-threadWaitRead (I# fd) = IO $ \s -> case waitRead# fd s of s -> (# s, () #)
-threadWaitWrite (I# fd) = IO $ \s -> case waitWrite# fd s of s -> (# s, () #)
--- #endif
-
\end{code}