stack-1.0.4.3: The Haskell Tool Stack

Safe HaskellNone
LanguageHaskell2010

Stack.Types.Version

Description

Versions for packages.

Synopsis

Documentation

data VersionRange :: *

Instances

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)))))) 

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.

mkVersion :: String -> Q Exp Source

Make a package 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.

nextMajorVersion :: Version -> Version Source

Get the next major version number for the given version