summaryrefslogtreecommitdiff
path: root/Utility/NotificationBroadcaster.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-12-13 00:24:19 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-12-13 00:24:19 -0400
commit94554782894ec6c26da3b46312d5d1d16d596458 (patch)
tree78746106bfb153945ccbfd2bbae536081c005e91 /Utility/NotificationBroadcaster.hs
parent55bd61d8c42aaf36a3c57f8444c493f6b045f4cd (diff)
finished where indentation changes
Diffstat (limited to 'Utility/NotificationBroadcaster.hs')
-rw-r--r--Utility/NotificationBroadcaster.hs18
1 files changed, 9 insertions, 9 deletions
diff --git a/Utility/NotificationBroadcaster.hs b/Utility/NotificationBroadcaster.hs
index 4bbbc544a..413ec2d75 100644
--- a/Utility/NotificationBroadcaster.hs
+++ b/Utility/NotificationBroadcaster.hs
@@ -45,13 +45,13 @@ newNotificationHandle :: NotificationBroadcaster -> IO NotificationHandle
newNotificationHandle b = NotificationHandle
<$> pure b
<*> addclient
- where
- addclient = do
- s <- newEmptySV
- atomically $ do
- l <- takeTMVar b
- putTMVar b $ l ++ [s]
- return $ NotificationId $ length l
+ where
+ addclient = do
+ s <- newEmptySV
+ atomically $ do
+ l <- takeTMVar b
+ putTMVar b $ l ++ [s]
+ return $ NotificationId $ length l
{- Extracts the identifier from a notification handle.
- This can be used to eg, pass the identifier through to a WebApp. -}
@@ -66,8 +66,8 @@ sendNotification :: NotificationBroadcaster -> IO ()
sendNotification b = do
l <- atomically $ readTMVar b
mapM_ notify l
- where
- notify s = writeSV s ()
+ where
+ notify s = writeSV s ()
{- Used by a client to block until a new notification is available since
- the last time it tried. -}