summaryrefslogtreecommitdiffhomepage
path: root/src/Plugins/Monitors/Disk.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/Disk.hs
parent35054d018c79d4b4da2dd93830dc351d28635242 (diff)
downloadxmobar-d9b24473ce65c6ce7f5bdea8c7d6eee07a62461e.tar.gz
xmobar-d9b24473ce65c6ce7f5bdea8c7d6eee07a62461e.tar.bz2
hlint refactorings
Diffstat (limited to 'src/Plugins/Monitors/Disk.hs')
-rw-r--r--src/Plugins/Monitors/Disk.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Plugins/Monitors/Disk.hs b/src/Plugins/Monitors/Disk.hs
index e0a7886..4cc2865 100644
--- a/src/Plugins/Monitors/Disk.hs
+++ b/src/Plugins/Monitors/Disk.hs
@@ -63,10 +63,10 @@ diskDevices req = do
s <- B.readFile "/proc/diskstats"
parse `fmap` mapM canon (devs s)
where
- canon (d, p) = do {d' <- canonicalizePath (d); return (d', p)}
+ canon (d, p) = do {d' <- canonicalizePath d; return (d', p)}
devs = map (third . B.words) . B.lines
parse = map undev . filter isReq
- third (_:_:c:_) = ("/dev/" ++ (B.unpack c), B.unpack c)
+ third (_:_:c:_) = ("/dev/" ++ B.unpack c, B.unpack c)
third _ = ("", "")
isReq (d, p) = p `elem` req || drop 5 d `elem` req
undev (d, f) = (drop 5 d, f)