From e41fd61bdeac8779fa24050cc0d44714f7c90f1d Mon Sep 17 00:00:00 2001 From: jao Date: Sat, 29 Apr 2017 02:09:24 +0200 Subject: hlint configuration --- src/Main.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/Main.hs') diff --git a/src/Main.hs b/src/Main.hs index 0596600..288939d 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -37,7 +37,7 @@ import System.Exit import System.Environment import System.FilePath (()) import System.Posix.Files -import Control.Monad (unless, liftM) +import Control.Monad (unless) import Text.Read (readMaybe) import Signal (setupSignalHandler) @@ -96,13 +96,13 @@ xdgConfigDir :: IO String xdgConfigDir = do env <- getEnvironment case lookup "XDG_CONFIG_HOME" env of Just val -> return val - Nothing -> liftM ( ".config") getHomeDirectory + Nothing -> fmap ( ".config") getHomeDirectory xmobarConfigDir :: IO FilePath -xmobarConfigDir = liftM ( "xmobar") xdgConfigDir +xmobarConfigDir = fmap ( "xmobar") xdgConfigDir getXdgConfigFile :: IO FilePath -getXdgConfigFile = liftM ( "xmobarrc") xmobarConfigDir +getXdgConfigFile = fmap ( "xmobarrc") xmobarConfigDir -- | Read default configuration file or load the default config readDefaultConfig :: IO (Config,[String]) @@ -231,7 +231,7 @@ doOpts conf (o:oo) = "specified with the -" ++ c:" option\n") readStr str = [x | (x,t) <- reads str, ("","") <- lex t] doOpts' opts = doOpts opts oo - readPosition string = + readPosition string = case readMaybe string of Just x -> doOpts' (conf { position = x }) Nothing -> do -- cgit v1.2.3