summaryrefslogtreecommitdiff
path: root/libraries/base
diff options
context:
space:
mode:
authorKazu Yamamoto <kazu@iij.ad.jp>2013-02-08 16:17:57 +0900
committerJohan Tibell <johan.tibell@gmail.com>2013-02-11 21:38:08 -0800
commit5186ffc5df803abb2b293f03973564efa5332c85 (patch)
tree59906cf148cc3cb52a709b86cdafa633a0abdac3 /libraries/base
parentd8b94b384152b6625778bdb063964055d9795d86 (diff)
downloadhaskell-5186ffc5df803abb2b293f03973564efa5332c85.tar.gz
Removing unnecessary trailing spaces.
Diffstat (limited to 'libraries/base')
-rw-r--r--libraries/base/GHC/Event/Manager.hs10
-rw-r--r--libraries/base/GHC/Event/Thread.hs4
2 files changed, 7 insertions, 7 deletions
diff --git a/libraries/base/GHC/Event/Manager.hs b/libraries/base/GHC/Event/Manager.hs
index 83b26d9c71..b764b6f53c 100644
--- a/libraries/base/GHC/Event/Manager.hs
+++ b/libraries/base/GHC/Event/Manager.hs
@@ -136,7 +136,7 @@ callbackTableVar mgr fd = emFds mgr ! hashFd fd
haveOneShot :: Bool
{-# INLINE haveOneShot #-}
#if defined(darwin_HOST_OS)
-haveOneShot = False
+haveOneShot = False
#elif defined(HAVE_EPOLL) || defined(HAVE_KQUEUE)
haveOneShot = True
#else
@@ -319,7 +319,7 @@ registerFd mgr cb fd evs = do
-- | Wake up the event manager.
wakeManager :: EventManager -> IO ()
#if defined(darwin_HOST_OS)
-wakeManager mgr = sendWakeup (emControl mgr)
+wakeManager mgr = sendWakeup (emControl mgr)
#elif defined(HAVE_EPOLL) || defined(HAVE_KQUEUE)
wakeManager _ = return ()
#else
@@ -377,7 +377,7 @@ closeFd mgr close fd = do
return (newMap, fds)
forM_ fds $ \(FdData reg ev cb) -> cb reg (ev `mappend` evtClose)
--- | Close a file descriptor in a race-safe way.
+-- | Close a file descriptor in a race-safe way.
-- It assumes the caller will update the callback tables and that the caller
-- holds the callback table lock for the fd. It must hold this lock because
-- this command executes a backend command on the fd.
@@ -428,7 +428,7 @@ onFdEvent mgr fd evs =
where
-- nothing to rearm.
aux [] _ [] =
- if haveOneShot
+ if haveOneShot
then return (curmap, cbs)
else do I.modifyFd (emBackend mgr) fd (eventsOf cbs) mempty
return (curmap, cbs)
@@ -437,7 +437,7 @@ onFdEvent mgr fd evs =
-- callback table for this fd, and we deleted above, so we know there
-- is no entry in the table for this fd.
aux [] fdds saved@(_:_) = do
- if haveOneShot
+ if haveOneShot
then I.modifyFdOnce (emBackend mgr) fd $ eventsOf saved
else I.modifyFd (emBackend mgr) fd (eventsOf cbs) $ eventsOf saved
return (snd $ IM.insertWith (\_ _ -> saved) fd' saved curmap, fdds)
diff --git a/libraries/base/GHC/Event/Thread.hs b/libraries/base/GHC/Event/Thread.hs
index 6d9905a616..9a43b4f9c0 100644
--- a/libraries/base/GHC/Event/Thread.hs
+++ b/libraries/base/GHC/Event/Thread.hs
@@ -333,7 +333,7 @@ ioManagerCapabilitiesChanged = do
let old_n_caps = high + 1
if new_n_caps > old_n_caps
then do new_eventManagerArray <- newIOArray (0, new_n_caps - 1) Nothing
-
+
-- copy the existing values into the new array:
forM_ [0..high] $ \i -> do
Just (tid,mgr) <- readIOArray eventManagerArray i
@@ -348,7 +348,7 @@ ioManagerCapabilitiesChanged = do
-- update the event manager array reference:
writeIORef eventManager new_eventManagerArray
- else when (new_n_caps > numEnabled) $
+ else when (new_n_caps > numEnabled) $
forM_ [numEnabled..new_n_caps-1] $ \i -> do
Just (_,mgr) <- readIOArray eventManagerArray i
tid <- restartPollLoop mgr i