darcs-2.18.2: a distributed, interactive, smart revision control system
Safe HaskellNone
LanguageHaskell2010

Darcs.Util.Prompt

Contents

Synopsis

User prompts

askEnter #

Arguments

:: String

The prompt to display

-> IO () 

Ask the user to press Enter

askUser #

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 #

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

data PromptConfig #

Constructors

PromptConfig 

Fields

promptYorn :: String -> IO Bool #

Prompt the user for a yes or no

promptChar :: PromptConfig -> IO Char #

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.