darcs-2.18.3: a distributed, interactive, smart revision control system
Safe HaskellSafe-Inferred
LanguageHaskell2010

Darcs.Util.Prompt

Contents

Synopsis

User prompts

askEnter Source #

Arguments

:: String

The prompt to display

-> IO () 

Ask the user to press Enter

askUser Source #

Arguments

:: String

The prompt to display

-> IO String

The string the user entered.

Ask the user for a line of input.

askUserListItem :: String -> [String] -> IO String Source #

askUserListItem prompt xs enumerates xs on the screen, allowing the user to choose one of the items

data PromptConfig Source #

Constructors

PromptConfig 

Fields

promptYorn :: String -> IO Bool Source #

Prompt the user for a yes or no

promptChar :: PromptConfig -> IO Char Source #

Prompt the user for a character, among a list of possible ones. Always returns a lowercase character. This is because the default character (ie, the character shown in uppercase, that is automatically selected when the user presses the space bar) is shown as uppercase, hence users may want to enter it as uppercase.