From cce2298c43759ee4aa314f07e5f6e8a71a38bf64 Mon Sep 17 00:00:00 2001 From: jao Date: Sun, 25 Nov 2018 04:26:10 +0000 Subject: Whitespace --- src/lib/Xmobar/Parsers.hs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/lib/Xmobar/Parsers.hs') diff --git a/src/lib/Xmobar/Parsers.hs b/src/lib/Xmobar/Parsers.hs index 33afd09..b7e4dbd 100644 --- a/src/lib/Xmobar/Parsers.hs +++ b/src/lib/Xmobar/Parsers.hs @@ -36,7 +36,8 @@ type ColorString = String type FontIndex = Int -- | Runs the string parser -parseString :: Config -> String -> IO [(Widget, ColorString, FontIndex, Maybe [Action])] +parseString :: Config -> String + -> IO [(Widget, ColorString, FontIndex, Maybe [Action])] parseString c s = case parse (stringParser (fgColor c) 0 Nothing) "" s of Left _ -> return [(Text $ "Could not parse string: " ++ s @@ -114,7 +115,8 @@ iconParser c f a = do i <- manyTill (noneOf ">") (try (string "/>")) return [(Icon i, c, f, a)] -actionParser :: String -> FontIndex -> Maybe [Action] -> Parser [(Widget, ColorString, FontIndex, Maybe [Action])] +actionParser :: String -> FontIndex -> Maybe [Action] + -> Parser [(Widget, ColorString, FontIndex, Maybe [Action])] actionParser c f act = do string " [Button] toButtons = map (\x -> read [x]) -- | Parsers a string wrapped in a color specification. -colorParser :: FontIndex -> Maybe [Action] -> Parser [(Widget, ColorString, FontIndex, Maybe [Action])] +colorParser :: FontIndex -> Maybe [Action] + -> Parser [(Widget, ColorString, FontIndex, Maybe [Action])] colorParser f a = do c <- between (string "") colors s <- manyTill (allParsers c f a) (try $ string "") return (concat s) -- | Parsers a string wrapped in a font specification. -fontParser :: ColorString -> Maybe [Action] -> Parser [(Widget, ColorString, FontIndex, Maybe [Action])] +fontParser :: ColorString -> Maybe [Action] + -> Parser [(Widget, ColorString, FontIndex, Maybe [Action])] fontParser c a = do f <- between (string "") colors s <- manyTill (allParsers c (read f) a) (try $ string "") -- cgit v1.2.3