Parse and pretty print the string of help of commands
- data CommandHelp = CommandHelp {
- name :: String
- synopsis :: String
- descriptions :: [String]
- errors :: [String]
- implementation :: String
- parseACommandHelp :: CharParser () CommandHelp
- parseCommandsHelp :: CharParser () [CommandHelp]
- run :: String -> GenParser Char () a -> (a -> Maybe b) -> Either String (Maybe b)
- tabulate :: [[String]] -> String
- listOfCommands :: String -> Either String (Maybe String)
- helpCommand :: String -> String -> Either String (Maybe String)
Documentation
data CommandHelp Source
structure for the help of a command
CommandHelp | |
|
parseACommandHelp :: CharParser () CommandHelpSource
parses a CommandHelp
parseCommandsHelp :: CharParser () [CommandHelp]Source
parses all commands help
:: String | The string to parse |
-> GenParser Char () a | the parser to use |
-> (a -> Maybe b) | a function to use on the result , if it succed |
-> Either String (Maybe b) | the error showed if it fails or the result closed |
run the parser against a string