Skip to content

Commit

Permalink
Flip sense of LE and GT haddocks
Browse files Browse the repository at this point in the history
  • Loading branch information
philderbeast committed Dec 7, 2024
1 parent 9d84fee commit 9b853e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Cabal-syntax/src/Distribution/Types/VersionRange.hs
Original file line number Diff line number Diff line change
Expand Up @@ -223,14 +223,14 @@ hasLowerBound =
(&&)
(||)

-- | Is the upper bound version range LEQ (less or equal, <=)?
-- | Is the upper bound version range (less than or equal (LE, <=)?
--
-- >>> forM ["< 1", "<= 1", ">= 0 && < 1", ">= 0 || < 1", ">= 0 && <= 1", ">= 0 || <= 1", "^>= 4.20.0.0"] (fmap hasLEQUpperBound . simpleParsec)
-- Just [False,True,False,False,True,True,False]
hasLEQUpperBound :: VersionRange -> Bool
hasLEQUpperBound = queryVersionRange (\case HasLEQUpperBound -> True; _ -> False) hasLEQUpperBound

-- | Is the lower bound version range GT (greater than, >)?
-- | Is the lower bound version range greater than (GT, >)?
--
-- >>> forM ["< 1", ">= 0 && < 1", ">= 0 || < 1", "> 0 && < 1", "> 0 || < 1", "^>= 4.20.0.0"] (fmap hasGTLowerBound . simpleParsec)
-- Just [False,False,False,True,True,False]
Expand Down

0 comments on commit 9b853e1

Please sign in to comment.