Safe Haskell | None |
---|---|
Language | Haskell2010 |
Snap.Utilities.Configuration
- cfgLookup :: Text -> (Value -> a) -> [ConfigPair] -> Maybe a
- cfgLookupWithDefault :: Text -> a -> (Value -> a) -> [ConfigPair] -> a
- stringValue :: Value -> String
- listValue :: Value -> [String]
- keyPre :: Text -> [Text]
- rebaseKey :: ConfigPair -> ConfigPair
- groupName :: [ConfigPair] -> String
- extractGroups :: (ConfigPair -> Bool) -> Config -> IO [[ConfigPair]]
- withValidGroup :: String -> (String -> String -> [ConfigPair] -> a) -> [ConfigPair] -> a
Documentation
cfgLookupWithDefault :: Text -> a -> (Value -> a) -> [ConfigPair] -> a Source
Look up a value and fall back to a default.
stringValue :: Value -> String Source
Show a Configurator value as a String.
groupName :: [ConfigPair] -> String Source
Get a name for a group of items. Has to drop 1 because the first item is always the type of group.
extractGroups :: (ConfigPair -> Bool) -> Config -> IO [[ConfigPair]] Source
withValidGroup :: String -> (String -> String -> [ConfigPair] -> a) -> [ConfigPair] -> a Source