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

Headroom.Configuration.Compat

Description

This module contains functions and data types used for checking compatibility of user's YAML configuration with current version of Headroom.

Synopsis

Documentation

data VersionError Source #

Exception specific to the Headroom.Configuration.Compat module.

Constructors

CannotParseVersion

cannot parse version info from given YAML configuration

NewerVersionDetected Version

configuration has newer version than Headroom

UnsupportedVersion [Version] Version

given YAML configuration is not compatible

checkCompatibility Source #

Arguments

:: MonadThrow m 
=> [Version]

list of versions with breaking changes in configuration

-> Version

current Headroom version

-> ByteString

raw, not yet parsed YAML configuration

-> m Version

detected compatible version or error

Checks whether the given not yet parsed YAML configuration is compatible, using list of versions that caused breaking changes into configuration.