conferer-0.2.0.0: Configuration management library

Safe HaskellSafe
LanguageHaskell2010

Conferer.FetchFromConfig.Basics

Contents

Synopsis

Documentation

fetchFromConfigWith :: forall a. Typeable a => (Text -> Maybe a) -> Key -> Config -> IO (Maybe a) Source #

findKeyAndApplyConfig Source #

Arguments

:: FetchFromConfig newvalue 
=> Config

Complete config

-> Key

Key that indicates the part of the config that we care about

-> Key

Key that we use to find the config (usually concatenating with the other key)

-> (newvalue -> config -> config)

Function that knows how to use the value to update the config

-> config

Result of the last config updating

-> IO config

Updated config

Concatenate many transformations to the config based on keys and functions

class UpdateFromConfigWithConNameG f where Source #

Methods

updateFromConfigWithConNameG :: String -> Key -> Config -> f a -> IO (f a) Source #

Instances
(UpdateFromConfigWithConNameG left, UpdateFromConfigWithConNameG right) => UpdateFromConfigWithConNameG (left :*: right) Source # 
Instance details

Defined in Conferer.FetchFromConfig.Basics

Methods

updateFromConfigWithConNameG :: String -> Key -> Config -> (left :*: right) a -> IO ((left :*: right) a) Source #

(UpdateFromConfigG inner, Selector selector) => UpdateFromConfigWithConNameG (S1 selector inner) Source # 
Instance details

Defined in Conferer.FetchFromConfig.Basics

Methods

updateFromConfigWithConNameG :: String -> Key -> Config -> S1 selector inner a -> IO (S1 selector inner a) Source #

Orphan instances

FetchFromConfig Bool Source # 
Instance details

Methods

fetch :: Key -> Config -> IO (Maybe Bool) Source #

FetchFromConfig Float Source # 
Instance details

Methods

fetch :: Key -> Config -> IO (Maybe Float) Source #

FetchFromConfig Int Source # 
Instance details

Methods

fetch :: Key -> Config -> IO (Maybe Int) Source #

FetchFromConfig Integer Source # 
Instance details

Methods

fetch :: Key -> Config -> IO (Maybe Integer) Source #

FetchFromConfig String Source # 
Instance details

Methods

fetch :: Key -> Config -> IO (Maybe String) Source #

FetchFromConfig ByteString Source # 
Instance details

FetchFromConfig Text Source # 
Instance details

Methods

fetch :: Key -> Config -> IO (Maybe Text) Source #

FetchFromConfig a => FetchFromConfig (Maybe a) Source # 
Instance details

Methods

fetch :: Key -> Config -> IO (Maybe (Maybe a)) Source #

FetchFromConfig inner => UpdateFromConfigG (Rec0 inner) Source #

Purely Generics machinery, ignore...

Instance details

Methods

updateFromConfigG :: Key -> Config -> Rec0 inner a -> IO (Rec0 inner a) Source #

UpdateFromConfigG inner => UpdateFromConfigG (D1 metadata inner) Source # 
Instance details

Methods

updateFromConfigG :: Key -> Config -> D1 metadata inner a -> IO (D1 metadata inner a) Source #

(UpdateFromConfigWithConNameG inner, Constructor constructor) => UpdateFromConfigG (C1 constructor inner) Source # 
Instance details

Methods

updateFromConfigG :: Key -> Config -> C1 constructor inner a -> IO (C1 constructor inner a) Source #