simple-prompt 0.2.0 → 0.2.0.1
raw patch · 3 files changed
+18/−3 lines, 3 files
Files
- README.md +8/−0
- simple-prompt.cabal +5/−3
- src/monadconstraint.h +5/−0
README.md view
@@ -2,6 +2,8 @@ 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@@ -12,3 +14,9 @@ - `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`.
simple-prompt.cabal view
@@ -1,10 +1,11 @@ name: simple-prompt-version: 0.2.0+version: 0.2.0.1 synopsis: Simple commandline text prompt functions description: The library provides prompt functions for reading user input:- prompt returns the input given, prompt_ ignores the input,- and yesno asks for confirmation.+ for example `prompt` returns the input given,+ `promptEnter` expects only Enter,+ and `yesNo` asks for confirmation. license: BSD3 license-file: LICENSE author: Jens Petersen <juhpetersen@gmail.com>@@ -16,6 +17,7 @@ build-type: Simple extra-doc-files: README.md ChangeLog.md+extra-source-files: src/monadconstraint.h cabal-version: 2.0 tested-with: GHC == 8.6.5 || == 8.8.4
+ src/monadconstraint.h view
@@ -0,0 +1,5 @@+#if MIN_VERSION_haskeline(0,8,0)+#define MONADCONSTRAINT (MonadIO m, MonadMask m)+#else+#define MONADCONSTRAINT MonadException m+#endif