| 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.Meta.Version
Description
This module contains data types and functions for working with Haskell PVP versions (https://pvp.haskell.org/faq/) in type safe way.
Documentation
Type safe representation of PVP version.
Constructors
| Version | |
Parses Version from given text.
>>>parseVersion "0.3.2.0"Just (Version {vMajor1 = 0, vMajor2 = 3, vMinor = 2, vPatch = 0})
Prints Version in major1.major2.minor.patch format.
>>>printVersion (Version 0 3 2 0)"0.3.2.0"
printVersionP :: Version -> Text Source #
Similar to printVersion, but adds the v prefix in front of the version
number.
>>>printVersionP (Version 0 3 2 0)"v0.3.2.0"
pvp :: QuasiQuoter Source #
QuasiQuoter for defining Version values checked at compile time.
>>>[pvp|1.2.3.4|]Version {vMajor1 = 1, vMajor2 = 2, vMinor = 3, vPatch = 4}