| Copyright | (c) Eric Mertens 2017 |
|---|---|
| License | ISC |
| Maintainer | emertens@gmail.com |
| Safe Haskell | None |
| Language | Haskell2010 |
Config.Schema.Load
Contents
Description
This module automates the extraction of a decoded value from a configuration value according to a specification as built using Config.Schema.Spec.
Documentation
Arguments
| :: ValueSpecs a | specification |
| -> Value | value |
| -> Either [LoadError] a | error or decoded value |
Match a Value against a ValueSpecs and return either
the interpretation of that value or the list of errors
encountered.
Errors
Type for errors that can be encountered while decoding a value according to a specification. The error includes a key path indicating where in the configuration file the error occurred.
Problems that can be encountered when matching a Value against a ValueSpecs.
Constructors
| MissingSection Text | missing section name |
| UnusedSections [Text] | unused section names |
| SpecMismatch Text | failed specification name |