From 0f83374060e3951bfe4266edf3feac0a46ff1192 Mon Sep 17 00:00:00 2001 From: Jonathan Lamothe Date: Fri, 28 Dec 2018 14:37:50 -0500 Subject: [PATCH] allow confirmation with a single keystroke --- app/Util.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Util.hs b/app/Util.hs index d49c31a..956c6c9 100644 --- a/app/Util.hs +++ b/app/Util.hs @@ -39,9 +39,9 @@ import System.Console.HCL ( Request , prompt , reqAgree + , reqChar , reqIf , reqMenu - , reqResp , required , runRequest ) @@ -87,6 +87,6 @@ tryReq :: Request a -> S.StateT s IO (Maybe a) tryReq = lift . runRequest confirm :: String -> Request Bool -confirm x = required $ prompt (x ++ " (y/n): ") $ reqAgree Nothing reqResp +confirm x = prompt (x ++ " (y/n): ") $ reqAgree Nothing $ fmap return reqChar --jl