Maintainer | Leon P Smith <leon@melding-monads.com> |
---|---|
Safe Haskell | None |
- type RMW r w a = r -> (Maybe a, w)
- type ConfigErrors = Maybe (DList ConfigError)
- class Applicative m => ConfigParser m where
- configParser_ :: RMW Config ConfigErrors a -> m a
- unConfigParser_ :: m a -> RMW Config ConfigErrors a
- newtype ConfigParserM a = ConfigParserM {}
- newtype ConfigParserA a = ConfigParserA {}
- newtype ConfigTransform = ConfigTransform (ConfigPlan ())
- interpConfigTransform :: ConfigTransform -> Config -> Config
Documentation
type ConfigErrors = Maybe (DList ConfigError)Source
class Applicative m => ConfigParser m whereSource
A ConfigParser
computation produces a value of type
from a given Maybe
aConfig
, in addition to a list of diagnostic messages,
which may be interpreted as warnings or errors as deemed appropriate.
The type class abstracts over ConfigParserM
and ConfigParserA
variants, which are isomorphic but have different Applicative
and
Monad
instances. This is intended to be a closed typeclass, without
any additional instances.
configParser_ :: RMW Config ConfigErrors a -> m aSource
unConfigParser_ :: m a -> RMW Config ConfigErrors aSource
newtype ConfigParserM a Source
newtype ConfigParserA a Source
After executing a subcomputation that returns a Nothing
value,
computations of type ConfigParserA
will continue to run in order to
produce more error messages. For this reason, ConfigParserA
does
not have a proper Monad
instance. (But see unsafeBind
)
newtype ConfigTransform Source
Conceptually, a ConfigTransform
is a function Config
->
Config
.
It's a restricted subset of such functions as to preserve the possibility
of reliable dependency tracking in later versions of configurator-ng.
Monoid ConfigTransform |
|