| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
Yesod.Default.Config2
Description
Some next-gen helper functions for the scaffolding's configuration system.
- newtype MergedValue = MergedValue {}
- applyCurrentEnv :: Bool -> Value -> IO Value
- getCurrentEnv :: IO (HashMap Text Text)
- applyEnvValue :: Bool -> HashMap Text Text -> Value -> Value
- loadAppSettings :: FromJSON settings => [FilePath] -> [Value] -> EnvUsage -> IO settings
- loadAppSettingsArgs :: FromJSON settings => [Value] -> EnvUsage -> IO settings
- configSettingsYml :: FilePath
- getDevSettings :: Settings -> IO Settings
- develMainHelper :: IO (Settings, Application) -> IO ()
- makeYesodLogger :: LoggerSet -> IO Logger
- data EnvUsage
- ignoreEnv :: EnvUsage
- useEnv :: EnvUsage
- requireEnv :: EnvUsage
- useCustomEnv :: HashMap Text Text -> EnvUsage
- requireCustomEnv :: HashMap Text Text -> EnvUsage
Documentation
getCurrentEnv :: IO (HashMap Text Text)
Arguments
| :: FromJSON settings | |
| => [FilePath] | run time config files to use, earlier files have precedence |
| -> [Value] | any other values to use, usually from compile time config. overridden by files |
| -> EnvUsage | |
| -> IO settings |
Load the settings from the following three sources:
- Run time config files
- Run time environment variables
- The default compile time config file
Arguments
| :: FromJSON settings | |
| => [Value] | any other values to use, usually from compile time config. overridden by files |
| -> EnvUsage | use environment variables |
| -> IO settings |
Same as loadAppSettings, but get the list of runtime config files from
the command line arguments.
Location of the default config file.
getDevSettings :: Settings -> IO Settings
Helper for getApplicationDev in the scaffolding. Looks up PORT and DISPLAY_PORT and prints appropriate messages.
develMainHelper :: IO (Settings, Application) -> IO ()
Helper for develMain in the scaffolding.
makeYesodLogger :: LoggerSet -> IO Logger
data EnvUsage
useCustomEnv :: HashMap Text Text -> EnvUsage
requireCustomEnv :: HashMap Text Text -> EnvUsage