summaryrefslogtreecommitdiff
path: root/libraries/base/Control/Concurrent.hs
diff options
context:
space:
mode:
authorHerbert Valerio Riedel <hvr@gnu.org>2013-09-15 23:05:05 +0200
committerHerbert Valerio Riedel <hvr@gnu.org>2013-09-17 09:54:07 +0200
commit0f5eae0232a86ec57d841a83e6929361e2751270 (patch)
tree7cc7b87fce8238cd9ff6b65fb0c37f515191aa6e /libraries/base/Control/Concurrent.hs
parent43ece172e7045d5ba633be6193f3e908eaa81f00 (diff)
downloadhaskell-0f5eae0232a86ec57d841a83e6929361e2751270.tar.gz
Constant-fold `__GLASGOW_HASKELL__` CPP conditionals
Now that HUGS and NHC specific code has been removed, this commit "folds" the now redundant `#if((n)def)`s containing `__GLASGOW_HASKELL__`. This renders `base` officially GHC only. This commit also removes redundant `{-# LANGUAGE CPP #-}`. Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Diffstat (limited to 'libraries/base/Control/Concurrent.hs')
-rw-r--r--libraries/base/Control/Concurrent.hs15
1 files changed, 0 insertions, 15 deletions
diff --git a/libraries/base/Control/Concurrent.hs b/libraries/base/Control/Concurrent.hs
index 09674f7064..4251ef1ef4 100644
--- a/libraries/base/Control/Concurrent.hs
+++ b/libraries/base/Control/Concurrent.hs
@@ -33,17 +33,13 @@ module Control.Concurrent (
-- * Basic concurrency operations
ThreadId,
-#ifdef __GLASGOW_HASKELL__
myThreadId,
-#endif
forkIO,
-#ifdef __GLASGOW_HASKELL__
forkFinally,
forkIOWithUnmask,
killThread,
throwTo,
-#endif
-- ** Threads with affinity
forkOn,
@@ -61,14 +57,12 @@ module Control.Concurrent (
-- $blocking
-#ifdef __GLASGOW_HASKELL__
-- ** Waiting
threadDelay,
threadWaitRead,
threadWaitWrite,
threadWaitReadSTM,
threadWaitWriteSTM,
-#endif
-- * Communication abstractions
@@ -77,7 +71,6 @@ module Control.Concurrent (
module Control.Concurrent.QSem,
module Control.Concurrent.QSemN,
-#ifdef __GLASGOW_HASKELL__
-- * Bound Threads
-- $boundthreads
rtsSupportsBoundThreads,
@@ -85,7 +78,6 @@ module Control.Concurrent (
isCurrentThreadBound,
runInBoundThread,
runInUnboundThread,
-#endif
-- * Weak references to ThreadIds
mkWeakThreadId,
@@ -117,7 +109,6 @@ import Prelude
import Control.Exception.Base as Exception
-#ifdef __GLASGOW_HASKELL__
import GHC.Exception
import GHC.Conc hiding (threadWaitRead, threadWaitWrite,
threadWaitReadSTM, threadWaitWriteSTM)
@@ -136,7 +127,6 @@ import Foreign.C
import System.IO
import Data.Maybe (Maybe(..))
#endif
-#endif
import Control.Concurrent.MVar
import Control.Concurrent.Chan
@@ -211,7 +201,6 @@ forkFinally action and_then =
mask $ \restore ->
forkIO $ try (restore action) >>= and_then
-#ifdef __GLASGOW_HASKELL__
-- ---------------------------------------------------------------------------
-- Bound Threads
@@ -396,9 +385,7 @@ runInUnboundThread action = do
unsafeResult :: Either SomeException a -> IO a
unsafeResult = either Exception.throwIO return
-#endif /* __GLASGOW_HASKELL__ */
-#ifdef __GLASGOW_HASKELL__
-- ---------------------------------------------------------------------------
-- threadWaitRead/threadWaitWrite
@@ -672,5 +659,3 @@ alternative then it is possible to prevent the thread from being
considered deadlocked by making a 'StablePtr' pointing to it. Don't
forget to release the 'StablePtr' later with 'freeStablePtr'.
-}
-
-#endif /* __GLASGOW_HASKELL__ */