summoner-2.0.1.1: Tool for scaffolding fully configured batteries-included production-level Haskell projects.
Copyright(c) 2017-2019 Kowainik
LicenseMPL-2.0
MaintainerKowainik <xrom.xkov@gmail.com>
Safe HaskellNone
LanguageHaskell2010

Summoner.Config

Description

Summoner configurations.

Synopsis

Documentation

data ConfigP (p :: Phase) Source #

Potentially incomplete configuration.

Constructors

ConfigP 

Fields

Instances

Instances details
Semigroup PartialConfig Source # 
Instance details

Defined in Summoner.Config

Monoid PartialConfig Source # 
Instance details

Defined in Summoner.Config

(Eq (p :- Text), Eq (p :- LicenseName), Eq (p :- [GhcVer])) => Eq (ConfigP p) Source # 
Instance details

Defined in Summoner.Config

Methods

(==) :: ConfigP p -> ConfigP p -> Bool #

(/=) :: ConfigP p -> ConfigP p -> Bool #

(Show (p :- Text), Show (p :- LicenseName), Show (p :- [GhcVer])) => Show (ConfigP p) Source # 
Instance details

Defined in Summoner.Config

Methods

showsPrec :: Int -> ConfigP p -> ShowS #

show :: ConfigP p -> String #

showList :: [ConfigP p] -> ShowS #

Generic (ConfigP p) Source # 
Instance details

Defined in Summoner.Config

Associated Types

type Rep (ConfigP p) :: Type -> Type #

Methods

from :: ConfigP p -> Rep (ConfigP p) x #

to :: Rep (ConfigP p) x -> ConfigP p #

type Rep (ConfigP p) Source # 
Instance details

Defined in Summoner.Config

type Rep (ConfigP p)

type PartialConfig = ConfigP 'Partial Source #

Incomplete configurations.

type Config = ConfigP 'Final Source #

Complete configurations.

configCodec :: TomlCodec PartialConfig Source #

Identifies how to read Config data from the .toml file.

defaultConfig :: PartialConfig Source #

Default Config configurations.

guessConfigFromGit :: IO PartialConfig Source #

Try to retrieve user information from Git config. Return the PartialConfig with the corresponding filled fields if the information is applicable.

finalise :: PartialConfig -> Validation [Text] Config Source #

Make sure that all the required configurations options were specified.

loadFileConfig :: MonadIO m => FilePath -> m PartialConfig Source #

Read configuration from the given file and return it in data type.