fortytwo-0.0.3: Interactive terminal prompt

Safe HaskellSafe
LanguageHaskell2010

FortyTwo.Utils

Synopsis

Documentation

map' :: (Int -> a -> b) -> [a] -> [b] Source #

Map a collection with an index

filter' :: Eq a => (Int -> a -> Bool) -> [a] -> [a] Source #

Filter a collection with index

getOptionsMeta :: Options -> (Int, Int, Maybe Int) Source #

Get useful informations from the options collection, like minVal, maxVal, activeIndex

stringsToOptions :: [String] -> Options Source #

Convert a string array to

focusOption :: Int -> Options -> Options Source #

Give the focus to a single option in the collection

toggleFocusedOption :: Int -> Options -> Options Source #

Toggle the isSelected flag for a single option

toCommaSeparatedString :: [String] -> String Source #

Print a list to comma separated

flush :: IO () Source #

Flush the output buffer

getOptionValue :: Option -> String Source #

Get the value of any option

getOptionIsFocused :: Option -> Bool Source #

Get the is focused attribute of any option

getOptionIsSelected :: Option -> Bool Source #

Get the is selected attribute of any option

getFocusedOptionIndex :: Options -> Maybe Int Source #

Get the index of the option selected

getSelecteOptionsIndexes :: Options -> [Int] Source #

Filter the indexes of the options selected