aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/app/Utils
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2017-06-11 05:37:27 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2017-06-11 05:37:27 +0300
commit742c541568f05d160784ace2024ee7256e3bd189 (patch)
tree1825605080aecab732ac59245dc762f4248945c7 /app/Utils
parentwindows-env.cabal: fix formatting (diff)
downloadwindows-env-742c541568f05d160784ace2024ee7256e3bd189.tar.gz
windows-env-742c541568f05d160784ace2024ee7256e3bd189.zip
refactoring
Diffstat (limited to '')
-rw-r--r--app/Utils/PromptMessage.hs16
1 files changed, 8 insertions, 8 deletions
diff --git a/app/Utils/PromptMessage.hs b/app/Utils/PromptMessage.hs
index 9afffb1..1315b85 100644
--- a/app/Utils/PromptMessage.hs
+++ b/app/Utils/PromptMessage.hs
@@ -15,25 +15,25 @@ import Text.Printf (printf)
import qualified WindowsEnv
-oldNewMessage :: WindowsEnv.Profile -> WindowsEnv.VarName -> String -> String -> String
+oldNewMessage :: WindowsEnv.Profile -> WindowsEnv.VarName -> WindowsEnv.VarValue -> WindowsEnv.VarValue -> String
oldNewMessage profile name oldValue newValue =
descrMsg ++ oldValueMsg ++ newValueMsg
where
profileKey = WindowsEnv.profileKeyPath profile
- descrMsg = printf "Saving variable '%s' to '%s'...\n" name (show profileKey)
- oldValueMsg = printf "\tOld value: %s\n" oldValue
- newValueMsg = printf "\tNew value: %s\n" newValue
+ descrMsg = printf "Saving variable '%s' to '%s'...\n" name $ show profileKey
+ oldValueMsg = printf "\tOld value: %s\n" $ WindowsEnv.varValueString oldValue
+ newValueMsg = printf "\tNew value: %s\n" $ WindowsEnv.varValueString newValue
-newMessage :: WindowsEnv.Profile -> WindowsEnv.VarName -> String -> String
+newMessage :: WindowsEnv.Profile -> WindowsEnv.VarName -> WindowsEnv.VarValue -> String
newMessage profile name newValue =
descrMsg ++ newValueMsg
where
profileKey = WindowsEnv.profileKeyPath profile
- descrMsg = printf "Saving variable '%s' to '%s'...\n" name (show profileKey)
- newValueMsg = printf "\tNew value: %s\n" newValue
+ descrMsg = printf "Saving variable '%s' to '%s'...\n" name $ show profileKey
+ newValueMsg = printf "\tNew value: %s\n" $ WindowsEnv.varValueString newValue
wipeMessage :: WindowsEnv.Profile -> WindowsEnv.VarName -> String
wipeMessage profile name =
- printf "Deleting variable '%s' from '%s'...\n" name (show profileKey)
+ printf "Deleting variable '%s' from '%s'...\n" name $ show profileKey
where
profileKey = WindowsEnv.profileKeyPath profile