diff options
author | Joey Hess <joey@kitenet.net> | 2012-10-30 17:14:26 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-10-30 17:14:51 -0400 |
commit | 4318f594d544320825093de8661ed1b40e4774d5 (patch) | |
tree | 709dcd2fe739c503651bc7bd5e1df35a52a27977 /Assistant/DaemonStatus.hs | |
parent | 07cd1b2b40735d460c8225762fcf3992b9886c60 (diff) |
finished pushing Assistant monad into all relevant files
All temporary and old functions are removed.
Diffstat (limited to 'Assistant/DaemonStatus.hs')
-rw-r--r-- | Assistant/DaemonStatus.hs | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/Assistant/DaemonStatus.hs b/Assistant/DaemonStatus.hs index 4223b6ce9..4744c86ba 100644 --- a/Assistant/DaemonStatus.hs +++ b/Assistant/DaemonStatus.hs @@ -24,30 +24,12 @@ import Data.Time import System.Locale import qualified Data.Map as M --- TODO remove this -getDaemonStatusOld :: DaemonStatusHandle -> IO DaemonStatus -getDaemonStatusOld = atomically . readTMVar - getDaemonStatus :: Assistant DaemonStatus getDaemonStatus = (atomically . readTMVar) <<~ daemonStatusHandle --- TODO remove this -modifyDaemonStatusOld_ :: DaemonStatusHandle -> (DaemonStatus -> DaemonStatus) -> IO () -modifyDaemonStatusOld_ dstatus a = modifyDaemonStatusOld dstatus $ \s -> (a s, ()) - modifyDaemonStatus_ :: (DaemonStatus -> DaemonStatus) -> Assistant () modifyDaemonStatus_ a = modifyDaemonStatus $ \s -> (a s, ()) --- TODO remove this -modifyDaemonStatusOld :: DaemonStatusHandle -> (DaemonStatus -> (DaemonStatus, b)) -> IO b -modifyDaemonStatusOld dstatus a = do - (s, b) <- atomically $ do - r@(s, _) <- a <$> takeTMVar dstatus - putTMVar dstatus s - return r - sendNotification $ changeNotifier s - return b - modifyDaemonStatus :: (DaemonStatus -> (DaemonStatus, b)) -> Assistant b modifyDaemonStatus a = do dstatus <- getAssistant daemonStatusHandle @@ -188,11 +170,6 @@ notifyTransfer = do liftIO $ sendNotification =<< transferNotifier <$> atomically (readTMVar dstatus) --- TODO remove -notifyTransferOld :: DaemonStatusHandle -> IO () -notifyTransferOld dstatus = sendNotification - =<< transferNotifier <$> atomically (readTMVar dstatus) - {- Send a notification when alerts are changed. -} notifyAlert :: Assistant () notifyAlert = do |