summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSpencer Janssen <sjanssen@cse.unl.edu>2007-07-17 23:11:38 +0200
committerSpencer Janssen <sjanssen@cse.unl.edu>2007-07-17 23:11:38 +0200
commite6c22f3308f3f5ed8fd573cde0a9f85a5ce20cae (patch)
tree5fa4d933c924d9d8a6aa3b857d9779151715b8f1
parentd119a36b71c03e4fa13651a2153cd9a0ad460e3a (diff)
downloadxmobar-e6c22f3308f3f5ed8fd573cde0a9f85a5ce20cae.tar.gz
xmobar-e6c22f3308f3f5ed8fd573cde0a9f85a5ce20cae.tar.bz2
execCommands is a mapM
darcs-hash:20070717211138-a5988-1ce4ccefb8b6468fc63ca8b98564881536ca60c2.gz
-rw-r--r--Xmobar.hs6
1 files changed, 1 insertions, 5 deletions
diff --git a/Xmobar.hs b/Xmobar.hs
index 6e598d7..4da9486 100644
--- a/Xmobar.hs
+++ b/Xmobar.hs
@@ -185,11 +185,7 @@ printStrings p gc fontst offs sl@((s,c,l):xs) =
-- | Runs a list of programs as independent threads and returns their thread id
-- and the MVar they will be writing to.
execCommands :: Config -> [(Runnable,String,String)] -> IO [(ThreadId, MVar String)]
-execCommands _ [] = return []
-execCommands c (x:xs) =
- do i <- execCommand c x
- is <- execCommands c xs
- return $ i : is
+execCommands c xs = mapM (execCommand c) xs
execCommand :: Config -> (Runnable,String,String) -> IO (ThreadId, MVar String)
execCommand c com =