This version can be pinned in stack with:simple-prompt-0.2.0.1@sha256:004aabe8a1f7ba96bbf207e301615d3a29482293b973ea7ad0e857f1391a7aea,2033
Module documentation for 0.2.0.1
simple-prompt
A simple commandline text prompt library for user input.
The SimplePrompt module provides:
prompt: returns a string
promptNonEmpty prompts for non-empty string
promptInitial with pre-filled initial input
promptPassword prompts for password
promptChar prompt for a character
promptEnter waits for Enter key
yesNo expects y/n answer
yesNoDefault [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, timedInput, nonEmptyInput.
Revision history for simple-prompt
0.2.0 (2023-05-28)
- new API using haskeline and MonadIO
- prompt ignores buffered stdin lines if it returns in milliseconds
- promptEnter replaces Prompt_
- new functions: promptEnter, promptInitial, promptNonEmpty, promptPassword
- yesNo and yesNoDefault replace yesno
- internal haskeline functions in SimplePrompt.Internal: including
getPrompt*, runPrompt, untilInput, mapInput, nonEmptyInput, timedInput
0.1.0 (2023-04-02)
- initial release with prompt, prompt_, yesno functions