fortytwo 1.0.6 → 1.0.7
raw patch · 4 files changed
+14/−11 lines, 4 filesdep ~ansi-terminaldep ~textPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: ansi-terminal, text
API changes (from Hackage documentation)
- FortyTwo.Renderers.Confirm: renderConfirm :: IO ()
+ FortyTwo.Renderers.Confirm: renderConfirm :: Bool -> IO ()
Files
- README.md +3/−3
- fortytwo.cabal +5/−5
- src/FortyTwo/Prompts/Confirm.hs +1/−1
- src/FortyTwo/Renderers/Confirm.hs +5/−2
README.md view
@@ -2,7 +2,7 @@ _Interactive terminal prompt_ -[![Build Status][travis-image]][travis-url]+[![Build Status][ci-image]][ci-url] [![MIT License][license-image]][license-url] @@ -117,8 +117,8 @@ This script is heavily inspired by [survey (golang)](https://github.com/AlecAivazis/survey) -[travis-image]:https://img.shields.io/travis/GianlucaGuarini/fortytwo.svg?style=flat-square-[travis-url]:https://travis-ci.org/GianlucaGuarini/fortytwo+[ci-image]: https://img.shields.io/github/actions/workflow/status/GianlucaGuarini/fortytwo/ci.yml?style=flat-square+[ci-url]: https://github.com/GianlucaGuarini/fortytwo/actions [license-image]:http://img.shields.io/badge/license-MIT-000000.svg?style=flat-square [license-url]:LICENSE
fortytwo.cabal view
@@ -1,13 +1,13 @@ name: fortytwo-version:1.0.6+version:1.0.7 synopsis: Interactive terminal prompt description: List of Prompt helpers to pimp the UIs of your haskell programs homepage: https://github.com/gianlucaguarini/fortytwo#readme license: MIT-license-file: LICENSE+license-file: LICENSE author: Gianluca Guarini maintainer: gianluca.guarini@gmail.com-copyright: Gianlua Guarini+copyright: Gianluca Guarini category: Prompt build-type: Simple extra-source-files: README.md@@ -35,8 +35,8 @@ FortyTwo.Renderers.Select FortyTwo.Renderers.Multiselect build-depends: base >= 4.7 && < 5,- text <= 1.3,- ansi-terminal >= 0.6.0.0 && <= 0.12+ text < 2.1,+ ansi-terminal >= 0.6.0.0 && < 1.1 default-language: Haskell2010 executable demo
src/FortyTwo/Prompts/Confirm.hs view
@@ -22,7 +22,7 @@ confirmWithDefault question defaultAnswer = do putStrLn emptyString renderQuestion question defaultAnswerHumanized emptyString- renderConfirm+ renderConfirm defaultAnswer flush answer <- getCleanConfirm clearLines 1
src/FortyTwo/Renderers/Confirm.hs view
@@ -4,5 +4,8 @@ ) where -- | Render the helper text-renderConfirm :: IO ()-renderConfirm = putStr " (y/N) "+renderConfirm :: Bool -> IO ()+renderConfirm defaultAnswer = putStr $ " (" ++ msg ++ ") "+ where+ msg | defaultAnswer = "Y/n"+ | otherwise = "y/N"