Safe Haskell | None |
---|---|
Language | Haskell2010 |
Versions for packages.
- data Version
- data VersionRange :: *
- data VersionCheck
- versionParser :: Parser Version
- parseVersion :: MonadThrow m => Text -> m Version
- parseVersionFromString :: MonadThrow m => String -> m Version
- versionString :: Version -> String
- versionText :: Version -> Text
- toCabalVersion :: Version -> Version
- fromCabalVersion :: Version -> Version
- mkVersion :: String -> Q Exp
- 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
Documentation
A package version.
data VersionRange :: *
Eq VersionRange | |
Data VersionRange | |
Read VersionRange | |
Show VersionRange | |
Generic VersionRange | |
Binary VersionRange | |
Text VersionRange | |
type Rep VersionRange = D1 D1VersionRange ((:+:) ((:+:) ((:+:) (C1 C1_0VersionRange U1) (C1 C1_1VersionRange (S1 NoSelector (Rec0 Version)))) ((:+:) (C1 C1_2VersionRange (S1 NoSelector (Rec0 Version))) (C1 C1_3VersionRange (S1 NoSelector (Rec0 Version))))) ((:+:) ((:+:) (C1 C1_4VersionRange (S1 NoSelector (Rec0 Version))) (C1 C1_5VersionRange ((:*:) (S1 NoSelector (Rec0 VersionRange)) (S1 NoSelector (Rec0 VersionRange))))) ((:+:) (C1 C1_6VersionRange ((:*:) (S1 NoSelector (Rec0 VersionRange)) (S1 NoSelector (Rec0 VersionRange)))) (C1 C1_7VersionRange (S1 NoSelector (Rec0 VersionRange)))))) |
data VersionCheck Source
versionParser :: Parser Version Source
Attoparsec parser for a package version.
parseVersion :: MonadThrow m => Text -> m Version Source
Convenient way to parse a package version from a Text
.
parseVersionFromString :: MonadThrow m => String -> m Version Source
Migration function.
versionString :: Version -> String Source
Get a string representation of a package version.
versionText :: Version -> Text Source
Get a string representation of a package version.
toCabalVersion :: Version -> Version Source
Convert to a Cabal version.
fromCabalVersion :: Version -> Version Source
Convert from a Cabal version.
versionRangeText :: VersionRange -> Text Source
Display a version range
withinRange :: Version -> VersionRange -> Bool Source
Check if a version is within a version range.
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