harg-0.5.0.0: Haskell program configuration using higher kinded data
Safe HaskellNone
LanguageHaskell2010

Options.Harg.Operations

Synopsis

Documentation

execOpt Source #

Arguments

:: forall c a. (TraversableB a, ApplicativeB a, TraversableB c, ApplicativeB 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

execOptDef Source #

Arguments

:: forall a. (TraversableB a, ApplicativeB a) 
=> a Opt

Target configuration options

-> IO (a Identity) 

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

execOptWithCtx Source #

Arguments

:: forall c a. (TraversableB a, ApplicativeB a, TraversableB c, ApplicativeB 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.

execOptWithCtxDef Source #

Arguments

:: forall a. (TraversableB a, ApplicativeB 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.

execCommands Source #

Arguments

:: forall c ts xs. (TraversableB (VariantF xs), TraversableB c, ApplicativeB 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

execCommandsDef Source #

Arguments

:: forall ts xs. (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)

execCommandsWithCtx Source #

Arguments

:: forall c ts xs. (TraversableB (VariantF xs), TraversableB c, ApplicativeB 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.

execCommandsWithCtxDef Source #

Arguments

:: forall ts xs. (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.