headroom-0.4.1.0: License Header Manager
Copyright(c) 2019-2021 Vaclav Svejcar
LicenseBSD-3-Clause
Maintainervaclav.svejcar@gmail.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Headroom.Configuration

Description

This module provides logic for working with the cofiguration data types. Headroom uses the partial options monoid pattern for the configuration.

Synopsis

Loading & Parsing Configuration

loadConfiguration :: (MonadIO m, MonadThrow m) => FilePath -> m PtConfiguration Source #

Loads and parses application configuration from given YAML file.

parseConfiguration Source #

Arguments

:: MonadThrow m 
=> ByteString

raw input to parse

-> m PtConfiguration

parsed application configuration

Parses application configuration from given raw input in YAML format.

Processing Partial Configuration

makeHeaderConfig Source #

Arguments

:: MonadThrow m 
=> FileType

determines for which file type this configuration is

-> PtHeaderConfig

source PtHeaderConfig

-> m CtHeaderConfig

full CtHeaderConfig

Makes full CtHeaderConfig from provided PtHeaderConfig (if valid).