Skip to content

Commit

Permalink
Allow querying for the wildcard version range.
Browse files Browse the repository at this point in the history
  • Loading branch information
nominolo committed Aug 6, 2007
1 parent 86c7273 commit 84cb848
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Distribution/Version.hs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ module Distribution.Version (
withinRange,
showVersionRange,
parseVersionRange,
isAnyVersion,

-- * Dependencies
Dependency(..),
Expand Down Expand Up @@ -215,6 +216,10 @@ data VersionRange
| IntersectVersionRanges VersionRange VersionRange
deriving (Show,Read,Eq)

isAnyVersion :: VersionRange -> Bool
isAnyVersion AnyVersion = True
isAnyVersion _ = False

orLaterVersion :: Version -> VersionRange
orLaterVersion v = UnionVersionRanges (ThisVersion v) (LaterVersion v)

Expand Down

0 comments on commit 84cb848

Please sign in to comment.