Safe Haskell | None |
---|---|
Language | Haskell2010 |
Versions for packages.
Synopsis
- data Version
- data VersionRange
- newtype IntersectingVersionRange = IntersectingVersionRange {}
- data VersionCheck
- versionRangeText :: VersionRange -> Text
- withinRange :: Version -> VersionRange -> Bool
- intersectVersionRanges :: VersionRange -> VersionRange -> VersionRange
- toMajorVersion :: Version -> Version
- latestApplicableVersion :: VersionRange -> Set Version -> Maybe Version
- checkVersion :: VersionCheck -> Version -> Version -> Bool
- nextMajorVersion :: Version -> Version
- minorVersion :: Version -> Version
- stackVersion :: Version
- stackMinorVersion :: Version
Documentation
A Version
represents the version of a software entity.
Instances of Eq
and Ord
are provided, which gives exact
equality and lexicographic ordering of the version number
components (i.e. 2.1 > 2.0, 1.2.3 > 1.2.2, etc.).
This type is opaque and distinct from the Version
type in
Data.Version since Cabal-2.0
. The difference extends to the
Binary
instance using a different (and more compact) encoding.
Since: Cabal-2.0.0.2
Instances
data VersionRange #
Instances
newtype IntersectingVersionRange Source #
Instances
data VersionCheck Source #
Instances
versionRangeText :: VersionRange -> Text Source #
Display a version range
withinRange :: Version -> VersionRange -> Bool #
Does this version fall within the given range?
This is the evaluation function for the VersionRange
type.
intersectVersionRanges :: VersionRange -> VersionRange -> VersionRange Source #
A modified intersection which also simplifies, for better display.
toMajorVersion :: Version -> Version Source #
Returns the first two components, defaulting to 0 if not present
latestApplicableVersion :: VersionRange -> Set Version -> Maybe Version Source #
Given a version range and a set of versions, find the latest version from the set that is within the range.
checkVersion :: VersionCheck -> Version -> Version -> Bool Source #
nextMajorVersion :: Version -> Version Source #
Get the next major version number for the given version
minorVersion :: Version -> Version Source #
Get minor version (excludes any patchlevel)
stackVersion :: Version Source #
Current Stack version
stackMinorVersion :: Version Source #
Current Stack minor version (excludes patchlevel)