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/RemovePath.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'app/RemovePath.hs') diff --git a/app/RemovePath.hs b/app/RemovePath.hs index 23cabb7..7157100 100644 --- a/app/RemovePath.hs +++ b/app/RemovePath.hs @@ -19,7 +19,7 @@ import Utils.Prompt import Utils.PromptMessage data Options = Options - { optName :: WindowsEnv.VarName + { optName :: WindowsEnv.Name , optYes :: Bool , optGlobal :: Bool , optPaths :: [String] @@ -69,8 +69,8 @@ removePath options = runExceptT doRemovePath >>= either ioError return defaultValue = do expandedPaths <- mapM WindowsEnv.expand pathsToRemove if pathsToRemove == expandedPaths - then return $ WindowsEnv.VarValue False "" - else return $ WindowsEnv.VarValue True "" + then return $ WindowsEnv.Value False "" + else return $ WindowsEnv.Value True "" doRemovePath = do removePathFrom WindowsEnv.CurrentUser @@ -82,7 +82,7 @@ removePath options = runExceptT doRemovePath >>= either ioError return let oldPaths = WindowsEnv.pathSplit $ show oldValue let newPaths = filter (flip notElem pathsToRemove) oldPaths when (length oldPaths /= length newPaths) $ do - let newValue = WindowsEnv.VarValue (WindowsEnv.varValueExpandable oldValue) (WindowsEnv.pathJoin newPaths) + let newValue = WindowsEnv.Value (WindowsEnv.valueExpandable oldValue) (WindowsEnv.pathJoin newPaths) let promptAnd = if skipPrompt then withoutPrompt else withPrompt $ oldNewMessage profile varName oldValue newValue -- cgit v1.2.3