summaryrefslogtreecommitdiffhomepage
path: root/src/Plugins/Monitors/CoreCommon.hs
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2017-04-29 02:09:24 +0200
committerjao <jao@gnu.org>2017-04-29 02:09:24 +0200
commite41fd61bdeac8779fa24050cc0d44714f7c90f1d (patch)
treef724480c121a1246c942ed913f167fa71a9e2564 /src/Plugins/Monitors/CoreCommon.hs
parent938a8d8307c1c4794c5fcf269c587c3c5c5e70df (diff)
downloadxmobar-e41fd61bdeac8779fa24050cc0d44714f7c90f1d.tar.gz
xmobar-e41fd61bdeac8779fa24050cc0d44714f7c90f1d.tar.bz2
hlint configuration
Diffstat (limited to 'src/Plugins/Monitors/CoreCommon.hs')
-rw-r--r--src/Plugins/Monitors/CoreCommon.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Plugins/Monitors/CoreCommon.hs b/src/Plugins/Monitors/CoreCommon.hs
index 943f491..2c10c70 100644
--- a/src/Plugins/Monitors/CoreCommon.hs
+++ b/src/Plugins/Monitors/CoreCommon.hs
@@ -29,7 +29,7 @@ checkedDataRetrieval :: (Ord a, Num a)
=> String -> [[String]] -> Maybe (String, String -> Int)
-> (Double -> a) -> (a -> String) -> Monitor String
checkedDataRetrieval msg paths lbl trans fmt =
- liftM (fromMaybe msg . listToMaybe . catMaybes) $
+ fmap (fromMaybe msg . listToMaybe . catMaybes) $
mapM (\p -> retrieveData p lbl trans fmt) paths
retrieveData :: (Ord a, Num a)
@@ -127,7 +127,7 @@ findFilesAndLabel path lbl = catMaybes
-- | Function to read the contents of the given file(s)
readFiles :: (String, Either Int (String, String -> Int))
-> Monitor (Int, String)
-readFiles (fval, flbl) = (,) <$> either return (\(f, ex) -> liftM ex
+readFiles (fval, flbl) = (,) <$> either return (\(f, ex) -> fmap ex
$ io $ readFile f) flbl
<*> io (readFile fval)