Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- fromEnv :: forall env. (Generic env, Envable (Rep env)) => EnvOptions -> IO (Either String env)
- data EnvOptions = EnvOptions {
- modifyFieldNames :: String -> String
- envKeyPrefix :: String
- defaultEnvOptions :: EnvOptions
- withPrefix :: String -> EnvOptions
Documentation
fromEnv :: forall env. (Generic env, Envable (Rep env)) => EnvOptions -> IO (Either String env) Source #
Tries to produce type env
from the environment variables. The
Envable
restriction is for ensuring type is a record-syntaxed product type.
data EnvOptions Source #
EnvOptions | |
|
withPrefix :: String -> EnvOptions Source #
This function is for generating the most common use case. Only sets the prefix over the default env options.