summaryrefslogtreecommitdiffhomepage
path: root/src/Xmobar/Plugins/Monitors/Cpu.hs
diff options
context:
space:
mode:
authorSibi Prabakaran <sibi@psibi.in>2020-06-14 18:08:03 +0530
committerjao <jao@gnu.org>2020-06-23 16:38:20 +0100
commit148f1083c45bc66112ff18d44f4d2a43d891c5ca (patch)
tree0c0825f99a00c61483e067b082a7d506ef3faa01 /src/Xmobar/Plugins/Monitors/Cpu.hs
parent2be4a584f29c3c9c105b56fcd83fa3f532caa4a0 (diff)
downloadxmobar-148f1083c45bc66112ff18d44f4d2a43d891c5ca.tar.gz
xmobar-148f1083c45bc66112ff18d44f4d2a43d891c5ca.tar.bz2
Hlint fixes
Diffstat (limited to 'src/Xmobar/Plugins/Monitors/Cpu.hs')
-rw-r--r--src/Xmobar/Plugins/Monitors/Cpu.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Xmobar/Plugins/Monitors/Cpu.hs b/src/Xmobar/Plugins/Monitors/Cpu.hs
index 22cd6bb..7f05663 100644
--- a/src/Xmobar/Plugins/Monitors/Cpu.hs
+++ b/src/Xmobar/Plugins/Monitors/Cpu.hs
@@ -134,7 +134,7 @@ parseCpu cref =
tot = fromIntegral $ sum dif
safeDiv n = case tot of
0 -> 0
- v -> (fromIntegral n) / v
+ v -> fromIntegral n / v
percent = map safeDiv dif
return $ convertToCpuData percent
@@ -181,9 +181,9 @@ computeFields [] _ = []
computeFields (x:xs) inputFields =
if x `elem` inputFields
then (Field {fieldName = x, fieldCompute = Compute}) :
- (computeFields xs inputFields)
+ computeFields xs inputFields
else (Field {fieldName = x, fieldCompute = Skip}) :
- (computeFields xs inputFields)
+ computeFields xs inputFields
formatCpu :: CpuArguments -> CpuData -> IO [String]
formatCpu CpuArguments{..} cpuInfo = do