summaryrefslogtreecommitdiff
path: root/src/Sequence/Utils.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Sequence/Utils.hs')
-rw-r--r--src/Sequence/Utils.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Sequence/Utils.hs b/src/Sequence/Utils.hs
index 32f8239..f0a8849 100644
--- a/src/Sequence/Utils.hs
+++ b/src/Sequence/Utils.hs
@@ -49,7 +49,7 @@ withFocus f = use gFocus >>= \focus -> case focus of
49 Nothing -> shellPutErrLn $ "Currently not focusing any entity" 49 Nothing -> shellPutErrLn $ "Currently not focusing any entity"
50 Just id -> f id 50 Just id -> f id
51 51
52askBool :: String -> Bool -> Sh st Bool 52askBool :: MonadIO m => String -> Bool -> m Bool
53askBool prompt initial = askQ prompt $ fromMaybe initial . join . fmap (eval . CI.mk) 53askBool prompt initial = askQ prompt $ fromMaybe initial . join . fmap (eval . CI.mk)
54 where 54 where
55 eval "yes" = Just True 55 eval "yes" = Just True
@@ -58,7 +58,7 @@ askBool prompt initial = askQ prompt $ fromMaybe initial . join . fmap (eval . C
58 eval "n" = Just False 58 eval "n" = Just False
59 eval _ = Nothing 59 eval _ = Nothing
60 60
61askQ :: String -> (Maybe String -> a) -> Sh st a 61askQ :: MonadIO m => String -> (Maybe String -> a) -> m a
62askQ prompt eval = eval <$> liftIO (readline $ prompt ++ " ") 62askQ prompt eval = eval <$> liftIO (readline $ prompt ++ " ")
63 63
64unaligned = view faction' def 64unaligned = view faction' def