From ac3b8212a68052f99eba2bd74a2dd8aa9ca2dcb2 Mon Sep 17 00:00:00 2001 From: jao Date: Sat, 1 Oct 2022 02:58:23 +0100 Subject: a couple of superfluous IO usages removed --- src/Xmobar/Text/Output.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Xmobar/Text/Output.hs') diff --git a/src/Xmobar/Text/Output.hs b/src/Xmobar/Text/Output.hs index 6e5b0f1..677b6d2 100644 --- a/src/Xmobar/Text/Output.hs +++ b/src/Xmobar/Text/Output.hs @@ -49,9 +49,9 @@ formatWithColor conf (Hspace n, i, x, y) = formatWithColor conf (Text $ replicate (fromIntegral n) ' ', i, x, y) formatWithColor _ _ = "" -format :: Config -> String -> IO String +format :: Config -> String -> String format conf s = do - segments <- parseString conf s + let segments = parseString conf s case textOutputFormat conf of - Swaybar -> return $ formatSwaybar conf segments - _ -> return (concatMap (formatWithColor conf) segments) + Swaybar -> formatSwaybar conf segments + _ -> concatMap (formatWithColor conf) segments -- cgit v1.2.3