diff options
author | Herbert Valerio Riedel <hvr@gnu.org> | 2013-09-15 23:05:05 +0200 |
---|---|---|
committer | Herbert Valerio Riedel <hvr@gnu.org> | 2013-09-17 09:54:07 +0200 |
commit | 0f5eae0232a86ec57d841a83e6929361e2751270 (patch) | |
tree | 7cc7b87fce8238cd9ff6b65fb0c37f515191aa6e /libraries/base/Control/Concurrent.hs | |
parent | 43ece172e7045d5ba633be6193f3e908eaa81f00 (diff) | |
download | haskell-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.hs | 15 |
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__ */ |