Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- updateAllAtOnceUsingFetch :: forall a. (FromConfig a, Typeable a) => Key -> Config -> a -> IO a
- parseBool :: Text -> Maybe Bool
- updateFromConfigByRead :: (Typeable a, Read a) => Key -> Config -> a -> IO a
- updateFromConfigByIsString :: (Typeable a, IsString a) => Key -> Config -> a -> IO a
- fetchFromConfigByRead :: (Typeable a, Read a) => Key -> Config -> IO (Maybe a)
- fetchFromConfigByIsString :: (Typeable a, IsString 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)
- updateFromConfigWith :: forall a. Typeable a => (Text -> Maybe a) -> Key -> Config -> a -> IO a
- findKeyAndApplyConfig :: forall newvalue config. FromConfig newvalue => Config -> Key -> Key -> (config -> newvalue) -> (newvalue -> config -> config) -> config -> IO config
- class FromConfigWithConNameG f where
Documentation
updateAllAtOnceUsingFetch :: forall a. (FromConfig a, Typeable a) => Key -> Config -> a -> IO a Source #
fetchFromConfigWith :: forall a. Typeable a => (Text -> Maybe a) -> Key -> Config -> IO (Maybe a) Source #
updateFromConfigWith :: forall a. Typeable a => (Text -> Maybe a) -> Key -> Config -> a -> IO a Source #
findKeyAndApplyConfig Source #
:: FromConfig 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) |
-> (config -> newvalue) | Function that knows how to use the value to update the config |
-> (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 FromConfigWithConNameG f where Source #
updateFromConfigWithConNameG :: String -> Key -> Config -> f a -> IO (f a) Source #
fetchFromConfigWithConNameG :: String -> Key -> Config -> IO (Maybe (f a)) Source #
Instances
(FromConfigWithConNameG left, FromConfigWithConNameG right) => FromConfigWithConNameG (left :*: right) Source # | |
(FromConfigG inner, Selector selector) => FromConfigWithConNameG (S1 selector inner) Source # | |
Orphan instances
FromConfig Bool Source # | |
FromConfig Float Source # | |
FromConfig Int Source # | |
FromConfig Integer Source # | |
FromConfig () Source # | |
FromConfig String Source # | |
FromConfig ByteString Source # | |
updateFromConfig :: Key -> Config -> ByteString -> IO ByteString Source # fetchFromConfig :: Key -> Config -> IO (Maybe ByteString) Source # | |
FromConfig Text Source # | |
DefaultConfig () Source # | |
FromConfig a => FromConfig (Maybe a) Source # | |
DefaultConfig (Maybe a) Source # | |
FromConfig inner => FromConfigG (Rec0 inner) Source # | Purely |
FromConfigG inner => FromConfigG (D1 metadata inner) Source # | |
(FromConfigWithConNameG inner, Constructor constructor) => FromConfigG (C1 constructor inner) Source # | |