Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- prompt :: (MonadIO m, MonadMask m) => String -> m String
- promptInitial :: (MonadIO m, MonadMask m) => String -> String -> m String
- promptBuffered :: (MonadIO m, MonadMask m) => String -> m String
- promptNonEmpty :: (MonadIO m, MonadMask m) => String -> m String
- promptChar :: (MonadIO m, MonadMask m) => String -> m Char
- promptKeyPress :: (MonadIO m, MonadMask m) => String -> m Bool
- promptEnter :: (MonadIO m, MonadMask m) => String -> m ()
- promptPassword :: (MonadIO m, MonadMask m) => String -> m String
- yesNo :: (MonadIO m, MonadMask m) => String -> m Bool
- yesNoDefault :: (MonadIO m, MonadMask m) => Bool -> String -> m Bool
Documentation
prompt :: (MonadIO m, MonadMask m) => String -> m String Source #
prompt which drops buffered input (using clearedInput
)
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 clearedInput
)
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 a printable character
promptKeyPress :: (MonadIO m, MonadMask m) => String -> m Bool Source #
prompt for key press (returns False if Ctrl-d or EOF)
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 #
Yes-No prompt (accepts only {y,n,yes,no} case-insensitive)
yesNoDefault :: (MonadIO m, MonadMask m) => Bool -> String -> m Bool Source #
Yes-No prompt with default (uses clearedInput
)