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.Source

Description

This module contains the type classes for generating a KeyTree representation of a configuration source. The primary purpose is to generate a "serialized" version of our Haskell type that can be easily mapped to configuration sources.

Since: 0.0.2.0

Synopsis

Documentation

type FetchSource (m :: Type -> Type) = KeyTree Text Text -> m (KeyTree Text Text) Source #

This type alias represents a function that fetches values from an external configuration source and inserts them into the leaves of our KeyTree

Since: 0.0.1.0

class ConfigSource (a :: k) where Source #

This is the instance that allows us to construct a tree representation of type a based on its structure.

Since: 0.0.1.0

Methods

configSource :: KeyTree Text Text Source #

Since the structure of a is statically known this KeyTree can be thought of as a constant, no runtime computation required!

Instances

Instances details
ConfigSource Int16 Source #

Since: 0.0.1.0

Instance details

Defined in Cfg.Source

ConfigSource Int32 Source #

Since: 0.0.1.0

Instance details

Defined in Cfg.Source

ConfigSource Int64 Source #

Since: 0.0.1.0

Instance details

Defined in Cfg.Source

ConfigSource Int8 Source #

Since: 0.0.1.0

Instance details

Defined in Cfg.Source

ConfigSource Word16 Source #

Since: 0.0.1.0

Instance details

Defined in Cfg.Source

ConfigSource Word32 Source #

Since: 0.0.1.0

Instance details

Defined in Cfg.Source

ConfigSource Word64 Source #

Since: 0.0.1.0

Instance details

Defined in Cfg.Source

ConfigSource Word8 Source #

Since: 0.0.1.0

Instance details

Defined in Cfg.Source

ConfigSource ByteString Source #

Since: 0.0.1.0

Instance details

Defined in Cfg.Source

ConfigSource ByteString Source #

Since: 0.0.1.0

Instance details

Defined in Cfg.Source

ConfigSource Text Source #

Since: 0.0.1.0

Instance details

Defined in Cfg.Source

ConfigSource Text Source #

Since: 0.0.1.0

Instance details

Defined in Cfg.Source

ConfigSource Integer Source #

Since: 0.0.1.0

Instance details

Defined in Cfg.Source

ConfigSource () Source #

Since: 0.0.1.0

Instance details

Defined in Cfg.Source

ConfigSource Bool Source #

Since: 0.0.1.1

Instance details

Defined in Cfg.Source

ConfigSource Char Source #

Since: 0.0.1.0

Instance details

Defined in Cfg.Source

ConfigSource Double Source #

Since: 0.0.1.0

Instance details

Defined in Cfg.Source

ConfigSource Float Source #

Since: 0.0.1.0

Instance details

Defined in Cfg.Source

ConfigSource Int Source #

Since: 0.0.1.0

Instance details

Defined in Cfg.Source

ConfigSource Word Source #

Since: 0.0.1.0

Instance details

Defined in Cfg.Source

ConfigSource (NonEmpty a :: Type) Source #

Since: 0.0.1.0

Instance details

Defined in Cfg.Source

(AssertTopLevelRecord (ConfigSource :: Type -> Constraint) a, DefaultSource a, Generic a, GConfigSource (Rep a)) => ConfigSource (Config a :: Type) Source #

Since: 0.0.2.0

Instance details

Defined in Cfg.Deriving.Config

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

ConfigSource (Vector a :: Type) Source #

Since: 0.0.1.0

Instance details

Defined in Cfg.Source

ConfigSource (Maybe a :: Type) Source #

Since: 0.0.1.0

Instance details

Defined in Cfg.Source

ConfigSource ([a] :: Type) Source #

Since: 0.0.1.0

Instance details

Defined in Cfg.Source

ConfigSource ((a, b) :: Type) Source #

Since: 0.0.1.0

Instance details

Defined in Cfg.Source

(GetConfigOptions t, AssertTopLevelRecord (ConfigSource :: Type -> Constraint) a, Generic a, DefaultSource a, GConfigSource (Rep a)) => ConfigSource (ConfigOpts t a :: Type) Source #

Since: 0.0.2.0

Instance details

Defined in Cfg.Deriving.Config

(ConfigRootOptions r f, AssertTopLevelRecord (ConfigSource :: Type -> Constraint) a, Generic a, DefaultSource a, GConfigSource (Rep a)) => ConfigSource (ConfigRoot r f a :: Type) Source #

Since: 0.0.2.0

Instance details

Defined in Cfg.Deriving.Config