aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/Utils.hs
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2016-07-12 00:29:40 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2016-07-12 00:29:40 +0300
commit7b4f37ffad0098a829f8b1c9cab26d51cd732bbc (patch)
tree4a3eb18e9e73fa570c043dc543e19b78d277c6bd /src/Utils.hs
parentrename modules + fix compiler warnings (diff)
downloadwindows-env-7b4f37ffad0098a829f8b1c9cab26d51cd732bbc.tar.gz
windows-env-7b4f37ffad0098a829f8b1c9cab26d51cd732bbc.zip
code style
Diffstat (limited to 'src/Utils.hs')
-rw-r--r--src/Utils.hs24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/Utils.hs b/src/Utils.hs
index 21ee67b..ec15405 100644
--- a/src/Utils.hs
+++ b/src/Utils.hs
@@ -6,24 +6,24 @@
module Utils where
-import Control.Monad ( liftM )
-import Data.Char ( toLower )
-import System.IO ( hFlush, stdout )
+import Control.Monad (liftM)
+import Data.Char (toLower)
+import System.IO (hFlush, stdout)
prompt :: String -> IO String
prompt banner = do
- putStr banner
- hFlush stdout
- getLine
+ putStr banner
+ hFlush stdout
+ getLine
promptYesNo :: String -> IO Bool
promptYesNo banner = do
- response <- liftM (map toLower) $ prompt banner
- if response `elem` yeses
- then return True
- else if response `elem` noes
- then return False
- else promptToContinue
+ response <- liftM (map toLower) $ prompt banner
+ if response `elem` yeses
+ then return True
+ else if response `elem` noes
+ then return False
+ else promptToContinue
where
yeses = ["y", "yes"]
noes = ["n", "no"]