summaryrefslogtreecommitdiffhomepage
path: root/src/Xmobar/Plugins/Monitors/Common/Parsers.hs
diff options
context:
space:
mode:
authorSibi Prabakaran <sibi@psibi.in>2020-06-20 21:39:02 +0530
committerjao <jao@gnu.org>2020-06-23 16:38:20 +0100
commit28ea8d95137131e81c836ed2d446f8925518e85c (patch)
tree16f823a3d81a4bbb22861ce46d869391ab679574 /src/Xmobar/Plugins/Monitors/Common/Parsers.hs
parent148f1083c45bc66112ff18d44f4d2a43d891c5ca (diff)
downloadxmobar-28ea8d95137131e81c836ed2d446f8925518e85c.tar.gz
xmobar-28ea8d95137131e81c836ed2d446f8925518e85c.tar.bz2
Update based on feedback on the PR
Diffstat (limited to 'src/Xmobar/Plugins/Monitors/Common/Parsers.hs')
-rw-r--r--src/Xmobar/Plugins/Monitors/Common/Parsers.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Xmobar/Plugins/Monitors/Common/Parsers.hs b/src/Xmobar/Plugins/Monitors/Common/Parsers.hs
index 188b87d..db2a652 100644
--- a/src/Xmobar/Plugins/Monitors/Common/Parsers.hs
+++ b/src/Xmobar/Plugins/Monitors/Common/Parsers.hs
@@ -41,8 +41,8 @@ import qualified Data.Map as Map
import System.Console.GetOpt (ArgOrder(Permute), OptDescr, getOpt)
import Text.ParserCombinators.Parsec
-runTemplateParser :: PureConfig -> IO [(String, String, String)]
-runTemplateParser PureConfig{..} = runP templateParser pTemplate
+runTemplateParser :: MonitorConfig -> IO [(String, String, String)]
+runTemplateParser MonitorConfig{..} = runP templateParser pTemplate
runExportParser :: [String] -> IO [(String, [(String, String,String)])]
runExportParser [] = pure []
@@ -51,8 +51,8 @@ runExportParser (x:xs) = do
rest <- runExportParser xs
pure $ (x,s):rest
-pureParseTemplate :: PureConfig -> TemplateInput -> IO String
-pureParseTemplate PureConfig{..} TemplateInput{..} =
+pureParseTemplate :: MonitorConfig -> TemplateInput -> IO String
+pureParseTemplate MonitorConfig{..} TemplateInput{..} =
do let m = let expSnds :: [([(String, String, String)], String)] = zip (map snd temAllTemplate) temMonitorValues
in Map.fromList $ zip (map fst temAllTemplate) expSnds
s <- minCombine m temInputTemplate