`hasLowerBound anyVersion`
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
The Haddock documentation for `Distribution.Types.VersionRange.hasLowerBound` explains (as it has since before `Cabal-3.4.0.0`):
~~~haskell
-- | Does the version range have an explicit lower bound?
--
-- Note: this function only considers the user-specified lower bounds, but not
-- the implicit >=0 lower bound.
~~~
Before `Cabal-3.4.0.0`, `hasLowerBound anyVersion` was `False` (`anyVersion` was `AnyVersion`). From `Cabal-3.4.0.0`, `hasLowerBound anyVersion` is `True` (the data constructor `AnyVersion` is no more, and `anyVersion` is now `OrLaterVersion (mkVersion [0])`).
Is this change in behaviour of `hasLowerBound anyVersion` what was intended when `AnyVersion` was dropped? Or should `hasLowerBound v` now begin `not (isAnyVersion v) || ...`?
Alternatively, could the current Haddock documentation be clarified, for example:
~~~haskell
-- | Does the version range have an explicit lower bound?
--
-- Note: this function only considers the user-specified lower bounds, but not
-- an implicit >=0 lower bound. @hasLowerBound anyVersion@ yields @True@ as
-- the >=0 lower bound is express.
~~~
Edit: Depending on what was intended, I can raise a pull request.
Contributor guide
Assessment
This issue has not been assessed yet.