summaryrefslogtreecommitdiff
path: root/Assistant/Pushes.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-10-31 02:34:03 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-10-31 02:34:03 -0400
commitacec36711090577752532a39f472e734e6b67fdb (patch)
tree6a3a5de0ec092e19c28464f4e2703fda9571b264 /Assistant/Pushes.hs
parent661eda766a8aa5c548ad89d8360bd4219eea138b (diff)
where indentation
Diffstat (limited to 'Assistant/Pushes.hs')
-rw-r--r--Assistant/Pushes.hs16
1 files changed, 8 insertions, 8 deletions
diff --git a/Assistant/Pushes.hs b/Assistant/Pushes.hs
index 122d46d21..6ac19405a 100644
--- a/Assistant/Pushes.hs
+++ b/Assistant/Pushes.hs
@@ -26,20 +26,20 @@ getFailedPushesBefore duration = do
m <- atomically $ readTMVar v
now <- getCurrentTime
return $ M.keys $ M.filter (not . toorecent now) m
- where
- toorecent now time = now `diffUTCTime` time < duration
+ where
+ toorecent now time = now `diffUTCTime` time < duration
{- Modifies the map. -}
changeFailedPushMap :: (PushMap -> PushMap) -> Assistant ()
changeFailedPushMap a = do
v <- getAssistant failedPushMap
liftIO $ atomically $ store v . a . fromMaybe M.empty =<< tryTakeTMVar v
- where
- {- tryTakeTMVar empties the TMVar; refill it only if
- - the modified map is not itself empty -}
- store v m
- | m == M.empty = noop
- | otherwise = putTMVar v $! m
+ where
+ {- tryTakeTMVar empties the TMVar; refill it only if
+ - the modified map is not itself empty -}
+ store v m
+ | m == M.empty = noop
+ | otherwise = putTMVar v $! m
notifyPush :: [UUID] -> Assistant ()
notifyPush us = flip putTSet us <<~ (pushNotifierSuccesses . pushNotifier)