diff options
Diffstat (limited to 'UI/Readline.hs')
-rw-r--r-- | UI/Readline.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/UI/Readline.hs b/UI/Readline.hs index 23be2e3..ed619df 100644 --- a/UI/Readline.hs +++ b/UI/Readline.hs @@ -131,7 +131,7 @@ myPromptKeyId title desc l = do putStrLn $ "Enter a number from 1 to " ++ show (length l) prompt -myWithProgress :: Title -> Desc -> ((Percent -> IO ()) -> IO ()) -> IO () +myWithProgress :: Title -> Desc -> ((Percent -> IO ()) -> IO a) -> IO a myWithProgress title desc a = bracket_ setup teardown (a sendpercent) where setup = do @@ -140,7 +140,9 @@ myWithProgress title desc a = bracket_ setup teardown (a sendpercent) sendpercent p = do putStr (show p ++ "% ") hFlush stdout - teardown = putStrLn "done" + teardown = do + putStrLn "done" + putStrLn "" showTitle :: Title -> IO () showTitle title = do |