configurator-ng-0.0.0.1: The next generation of configuration management

Copyright | (c) 2015-2016 Leon P Smith
License | BSD3
Maintainer | Leon P Smith <leon@melding-monads.com>
Safe Haskell | None
Language | Haskell98

Data.Configurator.Config.Internal

Description

Synopsis

- newtype Config = Config (ConfigMap Value)
- type ConfigMap a = ConfigPlan (CritBit Text a)
- data ConfigPlan a
  - = Subconfig Text (ConfigPlan a)
  - | Superconfig Text (ConfigPlan a)
  - | Union (ConfigPlan a) (ConfigPlan a)
  - | ConfigPlan a
  - | Empty
- lookup :: Text -> ConfigMap a -> Maybe a
- lookupWithName :: Name -> ConfigMap a -> Maybe (Name, a)
- subgroups :: Text -> ConfigMap a -> [Text]
- subassocs :: Text -> ConfigMap a -> [(Text, a)]
- null :: ConfigPlan (CritBit Text a) -> Bool
- subconfig :: Text -> ConfigMap a -> ConfigMap a
- superconfig :: Text -> ConfigMap a -> ConfigMap a
- union :: ConfigMap a -> ConfigMap a -> ConfigMap a
- subassocs_ :: (Text -> a -> [(Text, b)]) -> Text -> ConfigPlan a -> [(Text, b)]
- foldPlan :: b -> (b -> b -> b) -> (Text -> a -> b) -> Text -> ConfigPlan a -> b
- submap :: Text -> CritBit Text a -> CritBit Text a
- subgroupsMap :: Text -> CritBit Text a -> [Text]
- addPrefix :: Name -> Name -> Name
- stripPrefix :: Name -> Name -> Maybe Name

# Documentation

newtype Config #

A `Config` is a finite map from `Text` to `Value`.

Constructors

Config (ConfigMap Value) |

type ConfigMap a = ConfigPlan (CritBit Text a) #

data ConfigPlan a #

Constructors

Subconfig Text (ConfigPlan a) |
Superconfig Text (ConfigPlan a) |
Union (ConfigPlan a) (ConfigPlan a) |
ConfigPlan a |
Empty |

Instances

Functor ConfigPlan # |
Methods fmap :: (a -> b) -> ConfigPlan a -> ConfigPlan b # (<$) :: a -> ConfigPlan b -> ConfigPlan a #
Show a => Show (ConfigPlan a) # |
Methods showsPrec :: Int -> ConfigPlan a -> ShowS # show :: ConfigPlan a -> String # showList :: [ConfigPlan a] -> ShowS #

lookup :: Text -> ConfigMap a -> Maybe a #

lookupWithName :: Name -> ConfigMap a -> Maybe (Name, a) #

subgroups :: Text -> ConfigMap a -> [Text] #

subassocs :: Text -> ConfigMap a -> [(Text, a)] #

FIXME: improve this implementation.

null :: ConfigPlan (CritBit Text a) -> Bool #

subconfig :: Text -> ConfigMap a -> ConfigMap a #

superconfig :: Text -> ConfigMap a -> ConfigMap a #

union :: ConfigMap a -> ConfigMap a -> ConfigMap a #

subassocs_ :: (Text -> a -> [(Text, b)]) -> Text -> ConfigPlan a -> [(Text, b)] #

foldPlan :: b -> (b -> b -> b) -> (Text -> a -> b) -> Text -> ConfigPlan a -> b #

submap :: Text -> CritBit Text a -> CritBit Text a #

subgroupsMap :: Text -> CritBit Text a -> [Text] #

addPrefix :: Name -> Name -> Name #

stripPrefix :: Name -> Name -> Maybe Name #