Copyright | (c) 2019-2021 Vaclav Svejcar |
---|---|
License | BSD-3-Clause |
Maintainer | vaclav.svejcar@gmail.com |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
This module contains functions and data types used for checking compatibility of user's YAML configuration with current version of Headroom.
Synopsis
- data VersionError
- checkCompatibility :: MonadThrow m => [Version] -> Version -> ByteString -> m Version
Documentation
data VersionError Source #
Exception specific to the Headroom.Configuration.Compat module.
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 |
Instances
Eq VersionError Source # | |
Defined in Headroom.Configuration.Compat (==) :: VersionError -> VersionError -> Bool # (/=) :: VersionError -> VersionError -> Bool # | |
Show VersionError Source # | |
Defined in Headroom.Configuration.Compat showsPrec :: Int -> VersionError -> ShowS # show :: VersionError -> String # showList :: [VersionError] -> ShowS # | |
Exception VersionError Source # | |
Defined in Headroom.Configuration.Compat |
:: 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.