From 837e60b9d8826168896ad4155ff7046f00665f52 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sun, 11 Jun 2017 05:56:10 +0300 Subject: WindowsEnv: {VarName,VarValue} -> {Name,Value} Also, fix compiler warnings (I've got too used to building with `--ghc-options -w`). --- app/ListPaths.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'app/ListPaths.hs') diff --git a/app/ListPaths.hs b/app/ListPaths.hs index f832686..c507d39 100644 --- a/app/ListPaths.hs +++ b/app/ListPaths.hs @@ -30,7 +30,7 @@ data Source = Environment | Registry WindowsEnv.Profile deriving (Eq, Show) data Options = Options - { optName :: WindowsEnv.VarName + { optName :: WindowsEnv.Name , optWhichPaths :: WhichPaths , optSource :: Source } deriving (Eq, Show) @@ -70,12 +70,12 @@ listPaths options = runExceptT doListPaths >>= either ioError return query = queryFrom $ optSource options - queryFrom Environment = lift $ WindowsEnv.VarValue False <$> fromMaybe "" <$> lookupEnv varName + queryFrom Environment = lift $ WindowsEnv.Value False <$> fromMaybe "" <$> lookupEnv varName queryFrom (Registry profile) = WindowsEnv.query profile varName doListPaths = do - value <- query - split <- WindowsEnv.pathSplitAndExpand value + varValue <- query + split <- WindowsEnv.pathSplitAndExpand varValue lift $ do wanted <- filterM (shouldListPath whichPaths) split mapM_ (putStrLn . WindowsEnv.pathOriginal) wanted -- cgit v1.2.3