summaryrefslogtreecommitdiff
path: root/Assistant/Threads/TransferWatcher.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-10-02 22:59:07 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-10-02 22:59:07 -0400
commitc81a8bd68c53348b9e561dc588499452a5a654c7 (patch)
treed1c52c78723784f20c33763c282860878d19f979 /Assistant/Threads/TransferWatcher.hs
parent0d14a987dc4887de5516497206356652e846c996 (diff)
hlint
Diffstat (limited to 'Assistant/Threads/TransferWatcher.hs')
-rw-r--r--Assistant/Threads/TransferWatcher.hs9
1 files changed, 4 insertions, 5 deletions
diff --git a/Assistant/Threads/TransferWatcher.hs b/Assistant/Threads/TransferWatcher.hs
index 7045e842d..9bc851d4e 100644
--- a/Assistant/Threads/TransferWatcher.hs
+++ b/Assistant/Threads/TransferWatcher.hs
@@ -51,7 +51,7 @@ runHandler handler file _filestatus =
{- Called when there's an error with inotify. -}
onErr :: Handler
-onErr msg = error msg
+onErr = error
{- Called when a new transfer information file is written. -}
onAdd :: Handler
@@ -70,10 +70,9 @@ onAdd file = case parseTransferFile file of
- The only thing that should change in the transfer info is the
- bytesComplete, so that's the only thing updated in the DaemonStatus. -}
onModify :: Handler
-onModify file = do
- case parseTransferFile file of
- Nothing -> noop
- Just t -> go t =<< liftIO (readTransferInfoFile Nothing file)
+onModify file = case parseTransferFile file of
+ Nothing -> noop
+ Just t -> go t =<< liftIO (readTransferInfoFile Nothing file)
where
go _ Nothing = noop
go t (Just newinfo) = alterTransferInfo t $