yesod-1.4.1.5: Creation of type-safe, RESTful web applications.

Safe HaskellNone
LanguageHaskell98

Yesod.Default.Config2

Description

Some next-gen helper functions for the scaffolding's configuration system.

Synopsis

Documentation

newtype MergedValue Source

Constructors

MergedValue 

Fields

getMergedValue :: Value
 

Instances

Semigroup MergedValue 

applyCurrentEnv Source

Arguments

:: Bool

require an environment variable to be present?

-> Value 
-> IO Value 

getCurrentEnv :: IO (HashMap Text Text) Source

applyEnvValue Source

Arguments

:: Bool

require an environment variable to be present?

-> HashMap Text Text 
-> Value 
-> Value 

loadAppSettings Source

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

loadAppSettingsArgs Source

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.

configSettingsYml :: FilePath Source

Location of the default config file.

getDevSettings :: Settings -> IO Settings Source

Helper for getApplicationDev in the scaffolding. Looks up PORT and DISPLAY_PORT and prints appropriate messages.

develMainHelper :: IO (Settings, Application) -> IO () Source

Helper for develMain in the scaffolding.

makeYesodLogger :: LoggerSet -> IO Logger Source

useCustomEnv :: HashMap Text Text -> EnvUsage Source

requireCustomEnv :: HashMap Text Text -> EnvUsage Source