Commit 109e6c7a authored by Duncan Coutts's avatar Duncan Coutts
Browse files

Export withinVersion and deprecate betweenVersionsInclusive

parent d45db321
......@@ -55,6 +55,7 @@ module Distribution.Version (
laterVersion, earlierVersion,
orLaterVersion, orEarlierVersion,
unionVersionRanges, intersectVersionRanges,
withinVersion,
betweenVersionsInclusive,
-- ** Inspection
......@@ -154,10 +155,17 @@ unionVersionRanges = UnionVersionRanges
intersectVersionRanges :: VersionRange -> VersionRange -> VersionRange
intersectVersionRanges = IntersectVersionRanges
withinVersion :: Version -> VersionRange
withinVersion = WildcardVersion
betweenVersionsInclusive :: Version -> Version -> VersionRange
betweenVersionsInclusive v1 v2 =
IntersectVersionRanges (orLaterVersion v1) (orEarlierVersion v2)
{-# DEPRECATED betweenVersionsInclusive
"In practice this is not very useful because we normally use inclusive lower bounds and exclusive upper bounds"
#-}
-- | Fold over the syntactic structure of a 'VersionRange'.
--
-- This provides a syntacic view of the expression defining the version range.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment