Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
optparse-applicative
parsers for the Ribosome CLI.
Synopsis
- logParser :: Path Abs Dir -> Parser CliLogConfig
- confParser :: Path Abs Dir -> Parser c -> Parser (CliConfig, c)
- parseCli :: PluginName -> Parser c -> IO (CliConfig, c)
- withDefault :: HostConfig -> CliConfig -> HostConfig
- withCli :: PluginName -> HostConfig -> Parser c -> (HostConfig -> c -> IO a) -> IO a
Documentation
confParser :: Path Abs Dir -> Parser c -> Parser (CliConfig, c) Source #
Parse the host config as well as the arbitrary user defined config.
parseCli :: PluginName -> Parser c -> IO (CliConfig, c) Source #
Parse the host config as well as the arbitrary user defined config, in IO
.
withDefault :: HostConfig -> CliConfig -> HostConfig Source #
Parse the CLI options for a plugin config and update a default HostConfig
with the CLI options.
withCli :: PluginName -> HostConfig -> Parser c -> (HostConfig -> c -> IO a) -> IO a Source #
Parse the CLI options for a plugin config and pass an updated default HostConfig
to a callback.