remove pointless bracket
This commit is contained in:
parent
715a9a2f8e
commit
6420fa6c08
1 changed files with 2 additions and 2 deletions
|
@ -246,13 +246,13 @@ updateAlertMap dstatus a = notifyAlert dstatus `after` modifyDaemonStatus_ dstat
|
|||
alertWhile :: DaemonStatusHandle -> Alert -> IO Bool -> IO Bool
|
||||
alertWhile dstatus alert a = alertWhile' dstatus alert $ do
|
||||
r <- a
|
||||
return $ (r, r)
|
||||
return (r, r)
|
||||
|
||||
{- Like alertWhile, but allows the activity to return a value too. -}
|
||||
alertWhile' :: DaemonStatusHandle -> Alert -> IO (Bool, a) -> IO a
|
||||
alertWhile' dstatus alert a = do
|
||||
let alert' = alert { alertClass = Activity }
|
||||
i <- addAlert dstatus alert'
|
||||
(ok, r) <- bracket_ noop noop a
|
||||
(ok, r) <- a
|
||||
updateAlertMap dstatus $ mergeAlert i $ makeAlertFiller ok alert'
|
||||
return r
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue