cfg-0.0.2.2: Type directed application configuration parsing and accessors
Copyright© Jonathan Lorimer 2023
LicenseMIT
Maintainerjonathanlorimer@pm.me
Stabilitystable
Safe HaskellNone
LanguageHaskell2010

Cfg.Deriving.Value

Description

This module provides a type Value for generating instances for "leaf" elements of your configuration tree. These are the elements you actually care about and want to parse out of a configuration source.

Since: 0.0.2.0

Synopsis

Documentation

newtype Value a Source #

This newtype is used to derive ValueParser instances for your types using the deriving via mechanism. In general this should be used for sum types, and product types without named fields (i.e. not records). The majority of the types that you would want as values should have instances in Cfg.Source and Cfg.Parser.

Since: 0.0.2.0

Constructors

Value 

Fields

Instances

Instances details
ConfigSource (Value a :: Type) Source #

Base case for ConfigSource, inserts an empty map that indicates we are "expecting a value here"

Since: 0.0.1.0

Instance details

Defined in Cfg.Source

Generic a => Generic (Value a) Source #

Since: 0.0.2.0

Instance details

Defined in Cfg.Deriving.Value

Associated Types

type Rep (Value a) 
Instance details

Defined in Cfg.Deriving.Value

type Rep (Value a) = Rep a

Methods

from :: Value a -> Rep (Value a) x #

to :: Rep (Value a) x -> Value a #

(Generic a, GValueParser (Rep a)) => ConfigParser (Value a) Source #

Since: 0.0.2.0

Instance details

Defined in Cfg.Deriving.Value

(Generic a, GValueParser (Rep a)) => ValueParser (Value a) Source #

Since: 0.0.2.0

Instance details

Defined in Cfg.Deriving.Value

Methods

parser :: Parser (Value a) Source #

type Rep (Value a) Source # 
Instance details

Defined in Cfg.Deriving.Value

type Rep (Value a) = Rep a