Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
- data SemVer = SemVer {
- major :: Integer
- minor :: Integer
- patch :: Integer
- preRelease :: [SemVerIdentifier]
- buildMeta :: [SemVerIdentifier]
- data SemVerIdentifier
- = NumericIdentifier Integer
- | TextIdentifier Text
- type SemVerRangePart = [(Ordering, SemVer)]
- type SemVerRange = [SemVerRangePart]
- type SemVerRangeSet = [SemVerRange]
- parseSemVer :: Text -> Either ParseError SemVer
- parseSemVerRangeSet :: Text -> Either ParseError SemVerRangeSet
- satisfies :: SemVer -> SemVerRangeSet -> Bool
- toText :: SemVer -> Text
Documentation
A Semantic version, as defined by http://semver.org/
SemVer | |
|
data SemVerIdentifier Source #
a component of a pre-release or buildmeta identifier list
type SemVerRangePart = [(Ordering, SemVer)] Source #
type SemVerRange = [SemVerRangePart] Source #
A range of semantic versions. To satisfy the range, a SemVer
must
satisfy every element of the list.
type SemVerRangeSet = [SemVerRange] Source #
A set of semantic version ranges. To satisfy the set, a SemVer
must
satisfy at least one of the ranges in the list.
parseSemVer :: Text -> Either ParseError SemVer Source #
Parse a semantic version
parseSemVerRangeSet :: Text -> Either ParseError SemVerRangeSet Source #
Parse a SemVer range set according to the npm syntax.