configurator-ng-0.0.0.0: The next generation of configuration management

MaintainerLeon P Smith <leon@melding-monads.com>
Safe HaskellNone

Data.Configurator.Parser.Internal

Description

 

Synopsis

Documentation

type RMW r w a = r -> (Maybe a, w)Source

class Applicative m => ConfigParser m whereSource

The ConfigParser type class abstracts over ConfigParserM and ConfigParserA. This is intended to be a closed typeclass, without any additional instances.

Methods

configParser_ :: RMW Config ConfigErrors a -> m aSource

unConfigParser_ :: m a -> RMW Config ConfigErrors aSource

newtype ConfigParserM a Source

A ConfigParserM a computation produces a value of type Maybe a from a given Config, in addition to a list of diagnostic messages which may be interpreted as warnings or errors as deemed appropriate. If the value returned by a computation is Nothing, then no subsequent actions (e.g. via <*> or >>=) will be performed.

Constructors

ConfigParserM 

Fields

unConfigParserM :: RMW Config ConfigErrors a
 

newtype ConfigParserA a Source

A ConfigParserM a computation produces a value of type Maybe a from a given Config, in addition to a list of diagnostic messages. 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)

Constructors

ConfigParserA 

Fields

unConfigParserA :: RMW Config ConfigErrors a
 

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.

Constructors

ConfigTransform (ConfigPlan ()) 

Instances

Monoid ConfigTransform

mempty is the identity ConfigTransform, mappend is the composition of two ConfigTransforms.