fortytwo-1.0.2: Interactive terminal prompt

Safe HaskellSafe
LanguageHaskell2010

FortyTwo

Synopsis

Documentation

theAnswerToEverything :: Int Source #

The answer to everything in the universe

input :: String -> IO String Source #

Simple input question input "What is your name?"

inputWithDefault :: String -> String -> IO 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 :: String -> IO Bool Source #

Ask a confirm question by default it will be true

confirmWithDefault :: String -> Bool -> IO Bool Source #

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

password :: String -> IO String Source #

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

select :: String -> [String] -> IO String Source #

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

selectWithDefault :: String -> [String] -> String -> IO 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 :: String -> [String] -> IO [String] Source #

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

multiselectWithDefault :: String -> [String] -> [String] -> IO [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]