Constructors
Instances2Eq, Show
Eq ConstraintDefined in semver-0.4.0.1 · Data.SemVer.ConstraintShow ConstraintDefined in semver-0.4.0.1 · Data.SemVer.Constraint
:: a typeCtrl KGHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05
Modulesemver-0.4.0.1Haskell2010
An implementation of the Semantic Versioning Constraints. In absence of a standard around constraints, the behavior of node-semver is closely followed. The behavior is outlined here: https://github.com/npm/node-semver#ranges
Eq ConstraintDefined in semver-0.4.0.1 · Data.SemVer.ConstraintShow ConstraintDefined in semver-0.4.0.1 · Data.SemVer.ConstraintChecks whether the Version satisfies the Constraint
Note: Semantics of this are strange in the presence of pre-release identifiers. Without a proper standard for how constraint satisfaction should behave, this implementation attempts to follow the behavior of node-semver which can be found here: https://github.com/npm/node-semver#prerelease-tags.
This choice was made because node-semver is the most widely deployed implementation of semantic versioning with the best documentation around how to treat pre-release identifiers.
The summary is that you must opt into using pre-release identifiers by specifying them in the constraint and they must match the exact version that attempts to use a pre-release identifier.
Parsing function to create a Constraint from Text according to the rules specified here: https://github.com/npm/node-semver#ranges
Advanced syntax is not yet supported.