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

Copyright(c) 2015-2016 Leon P Smith
LicenseBSD3
MaintainerLeon P Smith <leon@melding-monads.com>
Safe HaskellNone
LanguageHaskell98

Data.Configurator.Parser.Internal

Description

 

Synopsis

Documentation

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

class Applicative m => ConfigParser m where #

A ConfigParser 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. 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.

Minimal complete definition

configParser_, unConfigParser_

newtype ConfigParserM a #

If the value returned by a computation is Nothing, then no subsequent actions (e.g. via <*> or >>=) will be performed.

newtype ConfigParserA a #

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 #

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 ())