summaryrefslogtreecommitdiffhomepage
path: root/src/Plugins/Monitors/Net.hs
diff options
context:
space:
mode:
authorReto Hablützel <rethab@rethab.ch>2014-08-09 21:33:10 +0200
committerjao <jao@gnu.org>2014-08-09 23:18:46 +0200
commitd9b24473ce65c6ce7f5bdea8c7d6eee07a62461e (patch)
treef748cd2c2f4df5753955a660044cf28a8737cb16 /src/Plugins/Monitors/Net.hs
parent35054d018c79d4b4da2dd93830dc351d28635242 (diff)
downloadxmobar-d9b24473ce65c6ce7f5bdea8c7d6eee07a62461e.tar.gz
xmobar-d9b24473ce65c6ce7f5bdea8c7d6eee07a62461e.tar.bz2
hlint refactorings
Diffstat (limited to 'src/Plugins/Monitors/Net.hs')
-rw-r--r--src/Plugins/Monitors/Net.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Plugins/Monitors/Net.hs b/src/Plugins/Monitors/Net.hs
index 31dc411..39bdd61 100644
--- a/src/Plugins/Monitors/Net.hs
+++ b/src/Plugins/Monitors/Net.hs
@@ -22,7 +22,7 @@ import Plugins.Monitors.Common
import Data.IORef (IORef, newIORef, readIORef, writeIORef)
import Data.Time.Clock (UTCTime, getCurrentTime, diffUTCTime)
-import Control.Monad (forM, filterM)
+import Control.Monad (forM, filterM, liftM)
import System.Directory (getDirectoryContents, doesFileExist)
import System.FilePath ((</>))
@@ -147,11 +147,11 @@ runNet :: NetDevRef -> String -> [String] -> Monitor String
runNet nref i _ = io (parseNet nref i) >>= printNet
parseNets :: [(NetDevRef, String)] -> IO [NetDev]
-parseNets = mapM $ \(ref, i) -> parseNet ref i
+parseNets = mapM $ uncurry parseNet
runNets :: [(NetDevRef, String)] -> [String] -> Monitor String
runNets refs _ = io (parseActive refs) >>= printNet
- where parseActive refs' = parseNets refs' >>= return . selectActive
+ where parseActive refs' = liftM selectActive (parseNets refs')
selectActive = maximum
startNet :: String -> [String] -> Int -> (String -> IO ()) -> IO ()