summaryrefslogtreecommitdiffhomepage
path: root/Plugins
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-12-11 20:44:27 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-12-11 20:44:27 +0100
commit643b9235844d730aa9f0340da2a290a3c42bbccc (patch)
tree05b98cd993ce416d63ee236c546842ccb212939e /Plugins
parent1ec32c8454672a058ce60c2cc13f2fec6b08dd02 (diff)
downloadxmobar-643b9235844d730aa9f0340da2a290a3c42bbccc.tar.gz
xmobar-643b9235844d730aa9f0340da2a290a3c42bbccc.tar.bz2
Couple of nits for the previous patch (Mail.hs)
Diffstat (limited to 'Plugins')
-rw-r--r--Plugins/Mail.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Plugins/Mail.hs b/Plugins/Mail.hs
index 165467a..89cac30 100644
--- a/Plugins/Mail.hs
+++ b/Plugins/Mail.hs
@@ -45,12 +45,12 @@ instance Exec Mail where
i <- initINotify
zipWithM_ (\d v -> addWatch i ev d (handle v)) ds vs
- forM (zip ds vs) $ \(d, v) -> do
+ forM_ (zip ds vs) $ \(d, v) -> do
s <- fmap (S.fromList . filter (not . isPrefixOf "."))
$ getDirectoryContents d
atomically $ modifyTVar v (S.union s)
- changeLoop (mapM (fmap S.size . readTVar) vs) $ \ns -> do
+ changeLoop (mapM (fmap S.size . readTVar) vs) $ \ns ->
cb . unwords $ [m ++ ":" ++ show n
| (m, n) <- zip ts ns
, n /= 0 ]
@@ -59,7 +59,7 @@ modifyTVar :: TVar a -> (a -> a) -> STM ()
modifyTVar v f = readTVar v >>= writeTVar v . f
expandHome :: FilePath -> IO FilePath
-expandHome ('~':'/':path) = getEnv "HOME" >>= return . flip (</>) path
+expandHome ('~':'/':path) = fmap (</> path) (getEnv "HOME")
expandHome p = return p
handle :: TVar (Set String) -> Event -> IO ()