| Copyright | (c) 2019-2021 Vaclav Svejcar |
|---|---|
| License | BSD-3-Clause |
| Maintainer | vaclav.svejcar@gmail.com |
| Stability | experimental |
| Portability | POSIX |
| Safe Haskell | None |
| Language | Haskell2010 |
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
- data VersionError
- checkCompatibility :: MonadThrow m => [Version] -> Version -> ByteString -> m Version
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 |
Instances
| Eq VersionError Source # | |
Defined in Headroom.Configuration.Compat | |
| Show VersionError Source # | |
Defined in Headroom.Configuration.Compat Methods showsPrec :: Int -> VersionError -> ShowS # show :: VersionError -> String # showList :: [VersionError] -> ShowS # | |
| Exception VersionError Source # | |
Defined in Headroom.Configuration.Compat Methods toException :: VersionError -> SomeException # fromException :: SomeException -> Maybe VersionError # displayException :: VersionError -> String # | |
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.