diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-08-16 16:59:25 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-08-16 16:59:25 -0400 |
commit | c2eba63d11c748aeebdd3a4a3a5b015ac5e2f2c9 (patch) | |
tree | f75ee5e067fee2b36fdc75ad470fd9cc2e11268e /UI/Readline.hs | |
parent | 9473fee1bb0f9f549de41eec9f7b7d141f2ebfd3 (diff) | |
download | keysafe-c2eba63d11c748aeebdd3a4a3a5b015ac5e2f2c9.tar.gz |
add cost estimates
Diffstat (limited to 'UI/Readline.hs')
-rw-r--r-- | UI/Readline.hs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/UI/Readline.hs b/UI/Readline.hs index ac962d2..8a3c4ee 100644 --- a/UI/Readline.hs +++ b/UI/Readline.hs @@ -32,15 +32,16 @@ readlineUI = UI myShowError :: Desc -> IO () myShowError desc = do hPutStrLn stderr $ "Error: " ++ desc + putStrLn "" -myPromptQuestion :: Title -> Desc -> IO Bool -myPromptQuestion title desc = do +myPromptQuestion :: Title -> Desc -> Question -> IO Bool +myPromptQuestion title desc question = do showTitle title go where go = do putStrLn desc - mresp <- readline "y/n? " + mresp <- readline $ question ++ " [y/n] " case mresp of Just s | "y" `isPrefixOf` (map toLower s) -> |