A simple commandline text prompt library for user input.
The SimplePrompt module provides:
prompt: returns a stringpromptNonEmptyprompts for non-empty stringpromptInitialwith pre-filled initial inputpromptPasswordprompts for passwordpromptCharprompts for a characterpromptKeyPresswaits for a key presspromptEnterwaits for Enter keyyesNoexpects y/n answeryesNoDefault[y/N] or [Y/n]
It uses haskeline to read the input.
The SimplePrompt.Internal module provides lower-level access to
functional haskeline InputT monad transformer-based prompt functions:
runPrompt,getPrompt*untilInput,mapInput,clearedInput,nonEmptyInput.
Since it basically runs in the IO monad usage is pretty simple.
For explicit examples search for import SimplePrompt in consumer packages:
dl-fedora, fbrnch, hkgr, rhbzquery, select-rpms, stack-clean-old