summaryrefslogtreecommitdiff
path: root/libraries/base/System/Timeout.hs
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2017-04-21 09:16:48 -0400
committerBen Gamari <ben@smart-cactus.org>2017-04-28 22:35:04 -0400
commit945c45ad50ed31e3acb96fdaafb21640c4669f12 (patch)
treeae2e59ba8d3a49bbd3c3dcece39d53aef691ed44 /libraries/base/System/Timeout.hs
parente5b3492f23c2296d0d8221e1787ee585331f726e (diff)
downloadhaskell-945c45ad50ed31e3acb96fdaafb21640c4669f12.tar.gz
Prefer #if defined to #ifdef
Our new CPP linter enforces this.
Diffstat (limited to 'libraries/base/System/Timeout.hs')
-rw-r--r--libraries/base/System/Timeout.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/libraries/base/System/Timeout.hs b/libraries/base/System/Timeout.hs
index d4ef0932b5..d34082e64f 100644
--- a/libraries/base/System/Timeout.hs
+++ b/libraries/base/System/Timeout.hs
@@ -18,7 +18,7 @@
module System.Timeout ( timeout ) where
-#ifndef mingw32_HOST_OS
+#if !defined(mingw32_HOST_OS)
import Control.Monad
import GHC.Event (getSystemTimerManager,
registerTimeout, unregisterTimeout)
@@ -80,7 +80,7 @@ timeout :: Int -> IO a -> IO (Maybe a)
timeout n f
| n < 0 = fmap Just f
| n == 0 = return Nothing
-#ifndef mingw32_HOST_OS
+#if !defined(mingw32_HOST_OS)
| rtsSupportsBoundThreads = do
-- In the threaded RTS, we use the Timer Manager to delay the
-- (fairly expensive) 'forkIO' call until the timeout has expired.