Portability | portable |
---|---|
Stability | experimental |
Maintainer | Leon P Smith <leon@melding-monads.com> |
Safe Haskell | None |
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
- = MissingValue
- | ExtraValues
- | ExhaustedValues
- | TypeError
- | ValueError
- | MonadFail
- | OtherError
- defaultConversionError :: ConversionError
- data KeyError = KeyError Name
- data Pattern
- type ChangeHandler = Name -> Maybe Value -> IO ()
Documentation
data AutoConfig Source
Directions for automatically reloading Config
data.
AutoConfig | |
|
data ConfigCache Source
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
.
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 Source
An error occurred during the low-level parsing of a configuration file.
data ConfigError Source
An error (or warning) from a higher-level parser of a configuration file.
data ConversionError Source
data ConversionErrorWhy Source
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
.