harg-0.3.0.0: Haskell program configuration using higher kinded data

Safe HaskellNone
LanguageHaskell2010

Options.Harg.Operations

Synopsis

Documentation

execOptWithCtx Source #

Arguments

:: (TraversableB a, ProductB a, TraversableB c, ProductB c, GetSource c Identity, RunSource (SourceVal c) a) 
=> HargCtx

Context containing the environment and the cmdline args

-> c Opt

Source options

-> a Opt

Target configuration options

-> IO (a Identity) 

Run the option parser and combine with values from the specified sources, passing the context explicitly.

execOpt Source #

Arguments

:: (TraversableB a, ProductB a, TraversableB c, ProductB c, GetSource c Identity, RunSource (SourceVal c) a) 
=> c Opt

Source options

-> a Opt

Target configuration options

-> IO (a Identity) 

Run the option parser and combine with values from the specified sources

execOptWithCtxDef Source #

Arguments

:: (TraversableB a, ProductB a) 
=> HargCtx

Context containing the environment and the cmdline args

-> a Opt

Target configuration options

-> IO (a Identity) 

Run the option parser only with default sources (environment variables), passing the context explicitly.

execOptDef Source #

Arguments

:: (TraversableB a, ProductB a) 
=> a Opt

Target configuration options

-> IO (a Identity) 

Run the option parser only with default sources (environment variables)

execCommandsWithCtx Source #

Arguments

:: (TraversableB (VariantF xs), TraversableB c, ProductB c, Subcommands ts xs, GetSource c Identity, All (RunSource (SourceVal (c :* HiddenSources))) xs, All (RunSource ()) xs, MapAssocList xs) 
=> HargCtx

Context containing the environment and the cmdline args

-> c Opt

Source options

-> AssocListF ts xs Opt

Target options associated with subcommands

-> IO (VariantF xs Identity) 

Run the subcommand parser and combine with values from the specified sources, passing the context explicitly.

execCommands Source #

Arguments

:: (TraversableB (VariantF xs), TraversableB c, ProductB c, Subcommands ts xs, GetSource c Identity, All (RunSource (SourceVal (c :* HiddenSources))) xs, All (RunSource ()) xs, MapAssocList xs) 
=> c Opt

Source options

-> AssocListF ts xs Opt

Target options associated with subcommands

-> IO (VariantF xs Identity) 

Run the subcommand parser and combine with values from the specified sources

execCommandsWithCtxDef Source #

Arguments

:: (TraversableB (VariantF xs), Subcommands ts xs, All (RunSource (SourceVal (DefaultSources :* HiddenSources))) xs, All (RunSource ()) xs, MapAssocList xs) 
=> HargCtx

Context containing the environment and the cmdline args

-> AssocListF ts xs Opt

Target options associated with subcommands

-> IO (VariantF xs Identity) 

Run the subcommand parser only with default sources (environment variables), passing the context explicitly.

execCommandsDef Source #

Arguments

:: (TraversableB (VariantF xs), Subcommands ts xs, All (RunSource (SourceVal (DefaultSources :* HiddenSources))) xs, All (RunSource ()) xs, MapAssocList xs) 
=> AssocListF ts xs Opt

Target options associated with subcommands

-> IO (VariantF xs Identity) 

Run the subcommand parser only with default sources (environment variables)

execParser :: HargCtx -> Parser a -> IO a Source #

Run the optparse-applicative parser, printing accumulated errors. Errors are printed as warnings if the parser succeeds.

execParserPure :: [String] -> Parser a -> ParserResult a Source #

Run the optparse-applicative parser and return the ParserResult