| Copyright | (c) 2019 Lucas David Traverso |
|---|---|
| License | MPL-2.0 |
| Maintainer | Lucas David Traverso <lucas6246@gmail.com> |
| Stability | unstable |
| Portability | portable |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Conferer.Config.Internal.Types
Description
Core types for Config (here because of depedency cycles)
Synopsis
- data Config = Config {
- configSources :: [Source]
- configDefaults :: Map Key [Dynamic]
- configKeyMappings :: [(Key, Key)]
- data KeyLookupResult
- = MissingKey [Key]
- | FoundInSources Key Text
- | FoundInDefaults Key [Dynamic]
- type SourceCreator = Config -> IO Source
Documentation
This type acts as the entry point for most of the library, it's main purpouse
is to expose a uniform interface into multiple configuration sources (such as
env vars, cli args, and many others including use defined ones using the
Source interface)
Constructors
| Config | |
Fields
| |
data KeyLookupResult Source #
Result of a key lookup in a Config
Constructors
| MissingKey [Key] | |
| FoundInSources Key Text | |
| FoundInDefaults Key [Dynamic] |
Instances
| Show KeyLookupResult Source # | |
Defined in Conferer.Config.Internal.Types Methods showsPrec :: Int -> KeyLookupResult -> ShowS # show :: KeyLookupResult -> String # showList :: [KeyLookupResult] -> ShowS # | |