Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- fetchFromConfigByRead :: (Typeable a, Read a) => Key -> Config -> IO (Maybe a)
- fromValueWith :: (Text -> Maybe a) -> Text -> Maybe a
- fetchFromConfigWith :: forall a. Typeable a => (Text -> Maybe a) -> Key -> Config -> IO (Maybe a)
- findKeyAndApplyConfig :: forall newvalue config. FetchFromConfig newvalue => Config -> Key -> Key -> (newvalue -> config -> config) -> config -> IO config
- class UpdateFromConfigWithConNameG f where
- updateFromConfigWithConNameG :: String -> Key -> Config -> f a -> IO (f a)
Documentation
fetchFromConfigWith :: forall a. Typeable a => (Text -> Maybe a) -> Key -> Config -> IO (Maybe a) Source #
findKeyAndApplyConfig Source #
:: 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 #
Instances
(UpdateFromConfigWithConNameG left, UpdateFromConfigWithConNameG right) => UpdateFromConfigWithConNameG (left :*: right) Source # | |
Defined in Conferer.FetchFromConfig.Basics | |
(UpdateFromConfigG inner, Selector selector) => UpdateFromConfigWithConNameG (S1 selector inner) Source # | |
Defined in Conferer.FetchFromConfig.Basics |
Orphan instances
FetchFromConfig Bool Source # | |
FetchFromConfig Float Source # | |
FetchFromConfig Int Source # | |
FetchFromConfig Integer Source # | |
FetchFromConfig String Source # | |
FetchFromConfig ByteString Source # | |
FetchFromConfig Text Source # | |
FetchFromConfig a => FetchFromConfig (Maybe a) Source # | |
FetchFromConfig inner => UpdateFromConfigG (Rec0 inner) Source # | Purely |
UpdateFromConfigG inner => UpdateFromConfigG (D1 metadata inner) Source # | |
(UpdateFromConfigWithConNameG inner, Constructor constructor) => UpdateFromConfigG (C1 constructor inner) Source # | |