aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/apps/RemovePath.hs
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2016-07-11 19:11:23 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2016-07-11 19:11:23 +0300
commit7b3fd9218596a2d7a14a92625a4d62c9a7b7b0f6 (patch)
tree8195393c18d0cdd3d9ebcdadb014d75285bfaf7e /apps/RemovePath.hs
parentbecome a proper stack project (diff)
downloadwindows-env-7b3fd9218596a2d7a14a92625a4d62c9a7b7b0f6.tar.gz
windows-env-7b3fd9218596a2d7a14a92625a4d62c9a7b7b0f6.zip
rename modules + fix compiler warnings
Diffstat (limited to 'apps/RemovePath.hs')
-rw-r--r--apps/RemovePath.hs14
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/RemovePath.hs b/apps/RemovePath.hs
index 2e8fd01..3071708 100644
--- a/apps/RemovePath.hs
+++ b/apps/RemovePath.hs
@@ -12,7 +12,7 @@ import System.Environment ( getArgs, getProgName )
import System.Exit ( exitFailure, exitSuccess )
import System.IO ( hPutStr, stderr )
-import qualified EnvUtils
+import qualified Environment
main :: IO ()
main = do
@@ -26,17 +26,17 @@ main = do
removePath :: [String] -> Options -> IO ()
removePath paths options = do
let varName = name options
- userVal <- EnvUtils.queryFromRegistry EnvUtils.CurrentUserEnvironment varName
- let userValParts = EnvUtils.splitPaths userVal
+ userVal <- Environment.queryFromRegistry Environment.CurrentUserEnvironment varName
+ let userValParts = Environment.splitPaths userVal
let newUserValParts = filter (`notElem` paths) userValParts
when (length userValParts /= length newUserValParts) $ do
- EnvUtils.saveToRegistryWithPrompt EnvUtils.CurrentUserEnvironment varName $ EnvUtils.joinPaths newUserValParts
+ Environment.saveToRegistryWithPrompt Environment.CurrentUserEnvironment varName $ Environment.joinPaths newUserValParts
when (global options) $ do
- globalVal <- EnvUtils.queryFromRegistry EnvUtils.AllUsersEnvironment varName
- let globalValParts = EnvUtils.splitPaths globalVal
+ globalVal <- Environment.queryFromRegistry Environment.AllUsersEnvironment varName
+ let globalValParts = Environment.splitPaths globalVal
let newGlobalValParts = filter (`notElem` paths) globalValParts
when (length globalValParts /= length newGlobalValParts) $ do
- EnvUtils.saveToRegistryWithPrompt EnvUtils.AllUsersEnvironment varName $ EnvUtils.joinPaths newGlobalValParts
+ Environment.saveToRegistryWithPrompt Environment.AllUsersEnvironment varName $ Environment.joinPaths newGlobalValParts
data Options = Options { name :: String
, global :: Bool }