fortytwo-2.0.0: Interactive terminal prompt
Safe HaskellSafe-Inferred
LanguageHaskell2010

FortyTwo

Synopsis

Documentation

theAnswerToEverything :: Int Source #

The answer to everything in the universe

input :: MonadIO m => String -> m String Source #

Simple input question input "What is your name?"

inputWithDefault :: MonadIO m => String -> String -> m String Source #

Ask a simple input question falling back to a default value if no answer will be provided inputWithDefault "What is your name?" "The Dude"

confirm :: MonadIO m => String -> m Bool Source #

Ask a confirm question by default it will be true

confirmWithDefault :: MonadIO m => String -> Bool -> m Bool Source #

Ask a confirm falling back to a default value if no answer will be provided

password :: MonadIO m => String -> m String Source #

Ask a user password password "What your secret password?"

select :: MonadIO m => String -> [String] -> m String Source #

Select prompt from a list of options select "What's your favourite color?" [Red, Yellow, Blue]

selectWithDefault :: MonadIO m => String -> [String] -> String -> m String Source #

Select prompt from a list of options falling back to a default value if no answer will be provided selectWithDefault "What's your favourite color?" [Red, Yellow, Blue] Red

multiselect :: MonadIO m => String -> [String] -> m [String] Source #

Multi Select prompt multiselect "What's your favourite color?" [Red, Yellow, Blue]

multiselectWithDefault :: MonadIO m => String -> [String] -> [String] -> m [String] Source #

Multi Select prompt, falling back to a default list of values if no answer will be provided multiselectWithDefault "What's your favourite color?" [Red, Yellow, Blue] [Red, Blue]