Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- renderVersionPage :: String -> Version -> [Chunk]
- parserDocs :: Parser a -> AnyDocs (Maybe SetDoc)
- commandParserDocs :: Command a -> CommandDoc (Maybe SetDoc)
- renderHelpPage :: String -> Version -> String -> AnyDocs (Maybe SetDoc) -> [Chunk]
- renderCommandHelpPage :: String -> [String] -> CommandDoc (Maybe SetDoc) -> [Chunk]
- renderManPage :: String -> Version -> String -> AnyDocs (Maybe SetDoc) -> [Chunk]
- renderReferenceDocumentation :: String -> AnyDocs (Maybe SetDoc) -> [Chunk]
- parserOptDocs :: Parser a -> AnyDocs (Maybe OptDoc)
- docsToOptDocs :: AnyDocs (Maybe SetDoc) -> AnyDocs (Maybe OptDoc)
- renderLongOptDocs :: AnyDocs (Maybe OptDoc) -> [Chunk]
- renderShortOptDocs :: String -> AnyDocs (Maybe OptDoc) -> [Chunk]
- parserEnvDocs :: Parser a -> AnyDocs EnvDoc
- docsToEnvDocs :: AnyDocs (Maybe SetDoc) -> AnyDocs EnvDoc
- renderEnvDocs :: AnyDocs EnvDoc -> [Chunk]
- parserConfDocs :: Parser a -> AnyDocs ConfDoc
- docsToConfDocs :: AnyDocs (Maybe SetDoc) -> AnyDocs ConfDoc
- renderConfDocs :: AnyDocs ConfDoc -> [Chunk]
- data AnyDocs a
- = AnyDocsCommands !(Maybe String) [CommandDoc a]
- | AnyDocsAnd ![AnyDocs a]
- | AnyDocsOr ![AnyDocs a]
- | AnyDocsSingle !a
- data SetDoc = SetDoc {
- setDocTryArgument :: !Bool
- setDocTrySwitch :: !Bool
- setDocTryOption :: !Bool
- setDocDasheds :: ![Dashed]
- setDocEnvVars :: !(Maybe (NonEmpty String))
- setDocConfKeys :: !(Maybe (NonEmpty (NonEmpty String, JSONSchema)))
- setDocDefault :: !(Maybe String)
- setDocExamples :: ![String]
- setDocMetavar :: !(Maybe Metavar)
- setDocHelp :: !(Maybe String)
- data OptDoc = OptDoc {
- optDocTryArgument :: !Bool
- optDocTrySwitch :: !Bool
- optDocTryOption :: !Bool
- optDocDasheds :: ![Dashed]
- optDocDefault :: !(Maybe String)
- optDocExamples :: ![String]
- optDocMetavar :: !(Maybe Metavar)
- optDocHelp :: !(Maybe String)
- data EnvDoc = EnvDoc {
- envDocVars :: !(NonEmpty String)
- envDocDefault :: !(Maybe String)
- envDocExamples :: ![String]
- envDocMetavar :: !(Maybe Metavar)
- envDocHelp :: !(Maybe String)
- data ConfDoc = ConfDoc {
- confDocKeys :: !(NonEmpty (NonEmpty String, JSONSchema))
- confDocDefault :: !(Maybe String)
- confDocExamples :: ![String]
- confDocHelp :: !(Maybe String)
- data CommandDoc a = CommandDoc {}
- settingSetDoc :: Setting a -> Maybe SetDoc
- renderSetDoc :: SetDoc -> [[Chunk]]
- settingOptDoc :: Setting a -> Maybe OptDoc
- renderOptDocLong :: OptDoc -> [[Chunk]]
- settingEnvDoc :: Setting a -> Maybe EnvDoc
- renderEnvDoc :: EnvDoc -> [[Chunk]]
- settingConfDoc :: Setting a -> Maybe ConfDoc
- renderConfDoc :: ConfDoc -> [[Chunk]]
- helpLines :: Help -> [[Chunk]]
Documentation
parserDocs :: Parser a -> AnyDocs (Maybe SetDoc) Source #
Derive parser documentation
API Note: We return a Maybe inside the AnyDocs so that we can keep track of hidden settings and use this information to know whether settings are optional or not.
commandParserDocs :: Command a -> CommandDoc (Maybe SetDoc) Source #
renderHelpPage :: String -> Version -> String -> AnyDocs (Maybe SetDoc) -> [Chunk] Source #
Render the output of top-level --help
renderCommandHelpPage :: String -> [String] -> CommandDoc (Maybe SetDoc) -> [Chunk] Source #
Render the output of a --help
with at least one command
renderManPage :: String -> Version -> String -> AnyDocs (Maybe SetDoc) -> [Chunk] Source #
Render the output of `--render-man-page` for reading with man
renderReferenceDocumentation :: String -> AnyDocs (Maybe SetDoc) -> [Chunk] Source #
Render reference documentation
renderLongOptDocs :: AnyDocs (Maybe OptDoc) -> [Chunk] Source #
Render long-form documentation of options
renderShortOptDocs :: String -> AnyDocs (Maybe OptDoc) -> [Chunk] Source #
Render short-form documentation of options
Internal
AnyDocsCommands !(Maybe String) [CommandDoc a] | |
AnyDocsAnd ![AnyDocs a] | |
AnyDocsOr ![AnyDocs a] | |
AnyDocsSingle !a |
Instances
SetDoc | |
|
OptDoc | |
|
EnvDoc | |
|
ConfDoc | |
|
data CommandDoc a Source #
Instances
Functor CommandDoc Source # | |
Defined in OptEnvConf.Doc fmap :: (a -> b) -> CommandDoc a -> CommandDoc b # (<$) :: a -> CommandDoc b -> CommandDoc a # | |
Show a => Show (CommandDoc a) Source # | |
Defined in OptEnvConf.Doc showsPrec :: Int -> CommandDoc a -> ShowS # show :: CommandDoc a -> String # showList :: [CommandDoc a] -> ShowS # |
renderSetDoc :: SetDoc -> [[Chunk]] Source #
renderOptDocLong :: OptDoc -> [[Chunk]] Source #
renderEnvDoc :: EnvDoc -> [[Chunk]] Source #
renderConfDoc :: ConfDoc -> [[Chunk]] Source #