yam-config-0.3.0: Yam Configuation
Yam.Config
class Config c where Source #
Minimal complete definition
fetch, merge, from
Methods
fetch :: Text -> c -> Either String c Source #
merge :: [c] -> c Source #
from :: (String, String) -> c Source #
fromEnv :: [(String, String)] -> c Source #
fromCommandLine :: [String] -> c Source #
Instances
fetch :: Text -> Value -> Either String Value Source #
merge :: [Value] -> Value Source #
from :: (String, String) -> Value Source #
fromEnv :: [(String, String)] -> Value Source #
fromCommandLine :: [String] -> Value Source #
class (Monad m, Config c) => HasValue m c v where Source #
parse
parse :: c -> m (Either String v) Source #
getValue :: Text -> c -> m (Either String v) Source #
getValueOrDef :: v -> Text -> c -> m v Source #
requireValue :: Text -> c -> m v Source #
parse :: Value -> m (Either String v) Source #
getValue :: Text -> Value -> m (Either String v) Source #
getValueOrDef :: v -> Text -> Value -> m v Source #
requireValue :: Text -> Value -> m v Source #
defaultConfig :: Config c => IO c Source #