Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data EnvSource (f :: Type -> Type) = EnvSource
- newtype EnvSourceVal = EnvSourceVal Environment
- lookupEnv :: Environment -> String -> Maybe String
- runEnvVarSource :: forall a f. (FunctorB a, Applicative f) => Environment -> a (Compose Opt f) -> a (Compose SourceRunResult f)
Documentation
data EnvSource (f :: Type -> Type) Source #
Source that enables a parser to read options from environment variables.
Instances
GetSource EnvSource f Source # | |
Generic (EnvSource f) Source # | |
ProductB EnvSource Source # | |
TraversableB EnvSource Source # | |
Defined in Options.Harg.Sources.Env btraverse :: Applicative t => (forall (a :: k). f a -> t (g a)) -> EnvSource f -> t (EnvSource g) # | |
FunctorB EnvSource Source # | |
Defined in Options.Harg.Sources.Env | |
type SourceVal EnvSource Source # | |
Defined in Options.Harg.Sources.Env | |
type Rep (EnvSource f) Source # | |
newtype EnvSourceVal Source #
Value of EnvSource
, which is an association list between environment
variable names and values (strings).
Instances
FunctorB a => RunSource EnvSourceVal a Source # | |
Defined in Options.Harg.Sources.Env runSource :: Applicative f => EnvSourceVal -> a (Compose Opt f) -> [a (Compose SourceRunResult f)] Source # |
lookupEnv :: Environment -> String -> Maybe String Source #
Try to get a value from the environment variable association list.
runEnvVarSource :: forall a f. (FunctorB a, Applicative f) => Environment -> a (Compose Opt f) -> a (Compose SourceRunResult f) Source #