| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Options.Harg.Config
Synopsis
- mkConfigParser :: forall f c. (Applicative f, TraversableB c, ApplicativeB c) => HargCtx -> c (Compose Opt f) -> Parser (c f)
- getConfig :: HargCtx -> Parser (c (f :: Type -> Type)) -> Parser (a (g :: Type -> Type)) -> IO (c f)
Documentation
mkConfigParser :: forall f c. (Applicative f, TraversableB c, ApplicativeB c) => HargCtx -> c (Compose Opt f) -> Parser (c f) Source #
Create a Parser for the configuration option parser, using
EnvSource as the only source.
getConfig :: HargCtx -> Parser (c (f :: Type -> Type)) -> Parser (a (g :: Type -> Type)) -> IO (c f) Source #
Run two option parsers in parallel and return the result of the
first one. This is used with the configuration parser being the first
argument, and the target option parser that has been converted to
the dummy parser using toDummyOpts as the second
one.