simple-prompt-0.2.0: Simple commandline text prompt functions
Safe HaskellSafe-Inferred
LanguageHaskell2010

SimplePrompt

Synopsis

Documentation

prompt :: (MonadIO m, MonadMask m) => String -> m String Source #

prompt which drops buffered input (using timedInput)

Ignores buffered input lines (ie if input line gotten in under 5ms)

promptInitial :: (MonadIO m, MonadMask m) => String -> String -> m String Source #

reads string with initial input (using timedInput)

promptBuffered :: (MonadIO m, MonadMask m) => String -> m String Source #

reads string with buffering

promptNonEmpty :: (MonadIO m, MonadMask m) => String -> m String Source #

reads non-empty string (using nonEmptyInput)

promptChar :: (MonadIO m, MonadMask m) => String -> m Char Source #

prompt for character key

promptEnter :: (MonadIO m, MonadMask m) => String -> m () Source #

prompt for Enter key

promptPassword :: (MonadIO m, MonadMask m) => String -> m String Source #

prompt for a password

yesNo :: (MonadIO m, MonadMask m) => String -> m Bool Source #

YesNo prompt (accepts only ynyesno in any case)

yesNoDefault :: (MonadIO m, MonadMask m) => Bool -> String -> m Bool Source #

Yes/No prompt with default (uses timedInput)