semver-range-0.1.1: An implementation of semver and semantic version ranges.

Safe HaskellNone
LanguageHaskell2010

Data.SemVer.Parser

Synopsis

Documentation

parseSemVer :: Text -> Either ParseError SemVer Source

Parse a string as an explicit version, or return an error.

parseSemVerRange :: Text -> Either ParseError SemVerRange Source

Parse a string as a version range, or return an error.

pSemVerRange :: Parser SemVerRange Source

Top-level parser. Parses a semantic version range.

pSemVer :: Parser SemVer Source

Parses a semantic version.

fromHaskellVersion :: Version -> Either Text SemVer Source

Parse a semver from a haskell version. There must be exactly three numbers in the versionBranch field.

matchText :: Text -> Text -> Either Text Bool Source

Parses the first argument as a range and the second argument as a semver, and returns whether they match.