conferer-0.1.0.4: Configuration management library

Safe HaskellSafe
LanguageHaskell2010

Conferer.Core

Synopsis

Documentation

getKey :: Key -> Config -> IO (Either Text Text) Source #

Most Basic function to interact directly with a Config. It always returns Text in the case of success and implements the logic to traverse providers inside the Config.

getFromConfig :: FetchFromConfig a => Key -> Config -> IO a Source #

Fetch a value from a config key that's parsed using the FetchFromConfig instance.

This function throws an exception if the key is not found.

(/.) :: Key -> Key -> Key Source #

Create a new Key by concatenating two existing keys.

emptyConfig :: Config Source #

The empty configuration, this Config is used as the base for most config creating functions.

addProvider :: ProviderCreator -> Config -> IO Config Source #

Instantiate a Provider using an ProviderCretor and a Config and add to the config

unsafeGetKey :: Key -> Config -> IO Text Source #

Same as getKey but it throws if the Key isn't found