| Copyright | (c) 2011 MailRank Inc. (c) 2015-2016 Leon P Smith |
|---|---|
| License | BSD3 |
| Maintainer | Leon P Smith <leon@melding-monads.com> |
| Stability | experimental |
| Portability | portable |
| Safe Haskell | None |
| Language | Haskell98 |
Data.Configurator.Types
Description
Types for working with configuration files.
- data AutoConfig = AutoConfig {
- interval :: Int
- onError :: SomeException -> IO ()
- data ConfigCache
- type Name = Text
- data Value
- data Worth a
- data ParseError = ParseError FilePath String
- data ConfigError = ConfigError {}
- data ConfigErrorLocation
- = KeyMissing [Name]
- | Key FilePath Name
- data ConversionError = ConversionError {}
- data ConversionErrorWhy
- defaultConversionError :: ConversionError
- data KeyError = KeyError Name
- data Pattern
- type ChangeHandler = Name -> Maybe Value -> IO ()
Documentation
data AutoConfig #
Directions for automatically reloading Config data.
Constructors
| AutoConfig | |
Fields
| |
Instances
data ConfigCache #
Global configuration data. This is the top-level config from which
Config values are derived by choosing a root location.
A value in a Config.
Constructors
| Bool Bool | A Boolean. Represented in a configuration file as |
| String Text | A Unicode string. Represented in a configuration file as text surrounded by double quotes. Escape sequences:
|
| Number Scientific | Integer. |
| List [Value] | Heterogeneous list. Represented in a configuration
file as an opening square bracket " |
Exceptions
data ParseError #
An error occurred during the low-level parsing of a configuration file.
Constructors
| ParseError FilePath String |
Instances
data ConfigError #
An error (or warning) from a higher-level parser of a configuration file.
Constructors
| ConfigError | |
Instances
data ConversionError #
Constructors
| ConversionError | |
Fields
| |
Instances
data ConversionErrorWhy #
Instances
An error occurred while lookup up the given Name.
Notification of configuration changes
A pattern specifying the name of a property that has changed.
This type is an instance of the IsString class. If you use the
OverloadedStrings language extension and want to write a
prefix-matching pattern as a literal string, do so by suffixing
it with ".*", for example as follows:
"foo.*"
If a pattern written as a literal string does not end with
".*", it is assumed to be exact.