From 87ae152b71317b99bcbeeab80145ae1f3cf22d83 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sat, 20 Aug 2016 15:54:43 +0300 Subject: fix HLint warnings --- apps/ListPath.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'apps/ListPath.hs') diff --git a/apps/ListPath.hs b/apps/ListPath.hs index bed1978..b9cc121 100644 --- a/apps/ListPath.hs +++ b/apps/ListPath.hs @@ -6,7 +6,7 @@ module Main (main) where -import Control.Monad (filterM, liftM) +import Control.Monad (filterM) import Data.Maybe (fromMaybe) import System.Directory (doesDirectoryExist) import System.Environment (lookupEnv) @@ -20,7 +20,7 @@ data WhichPaths = All | ExistingOnly | MissingOnly shouldListPath :: WhichPaths -> Env.VarValue -> IO Bool shouldListPath All = return . const True shouldListPath ExistingOnly = doesDirectoryExist -shouldListPath MissingOnly = liftM not . doesDirectoryExist +shouldListPath MissingOnly = fmap not . doesDirectoryExist data Options = Options { optName :: Env.VarName @@ -53,7 +53,7 @@ listPath options = do varName = optName options whichPaths = optWhichPaths options - query = liftM (fromMaybe "") $ lookupEnv varName + query = fromMaybe "" <$> lookupEnv varName printPaths paths = filterM (shouldListPath whichPaths) paths >>= mapM_ putStrLn -- cgit v1.2.3