Copyright | (c) Eric Mertens 2017 |
---|---|
License | ISC |
Maintainer | emertens@gmail.com |
Safe Haskell | None |
Language | Haskell2010 |
This module automates the extraction of a decoded value from a configuration value according to a specification as built using Config.Schema.Spec.
Documentation
:: 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
.
MissingSection Text | missing section name |
UnusedSections [Text] | unused section names |
SpecMismatch Text | failed specification name |