License | BSD-Style |
---|---|
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Copyright : Copyright © 2014 Nicolas DI PRIMA
Maintainer : Nicolas DI PRIMA nicolas@di-prima.fr Stability : experimental Portability : unknown
- defaultMain :: CLIContext -> IO ()
- class CLI cli where
- data OptHelp = OptHelp {
- optSymbols :: [String]
- optArgument :: Maybe String
- optDescription :: String
- data Usage
- printUsage :: String -> String -> CLIContext -> String
- data Help = Help
- printHelp :: String -> String -> CLIContext -> String
- data CLIContext
- getHeader :: CLIContext -> String
- getDefault :: CLIContext -> Maybe Command
- initialize :: CLI cliDefault => Maybe cliDefault -> String -> CLIContext
- with :: CLI cli => cli -> CLIContext -> CLIContext
Default Main
:: CLIContext | A collection of commands |
-> IO () |
CLI
OptHelp | |
|
Default CLIs
:: String | indentation |
-> String | program name |
-> CLIContext | the command to print |
-> String |
Pretty printer: list the available commands
Commands
getHeader :: CLIContext -> String Source
getDefault :: CLIContext -> Maybe Command Source
:: CLI cliDefault | |
=> Maybe cliDefault | The command to execute if no option is given |
-> String | CLI Description |
-> CLIContext |
Initialize a collection of commands
:: CLI cli | |
=> cli | A new Command Interface |
-> CLIContext | The original Collection of commands |
-> CLIContext |
Add a new Command into a collection of commands