diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2016-08-20 15:54:43 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2016-08-20 15:54:43 +0300 |
commit | 87ae152b71317b99bcbeeab80145ae1f3cf22d83 (patch) | |
tree | 0ba746abfb44730f07cf7681f90e6340cfaa0a9b /apps/ListPath.hs | |
parent | list_path: no weird symbols in output (diff) | |
download | windows-env-87ae152b71317b99bcbeeab80145ae1f3cf22d83.tar.gz windows-env-87ae152b71317b99bcbeeab80145ae1f3cf22d83.zip |
fix HLint warnings
Diffstat (limited to 'apps/ListPath.hs')
-rw-r--r-- | apps/ListPath.hs | 6 |
1 files changed, 3 insertions, 3 deletions
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 |