Skip to content

Commit e9c1e38

Browse files
committed
Add version ranges
1 parent e60c5ca commit e9c1e38

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

doc/how-to-freeze-versions.rst

+17
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,23 @@ Frozen versions
2828
Version ranges
2929
--------------
3030

31+
A dependency can have a version range specified in the package description.
32+
This is expected for published packages. The `cabal check` command will check
33+
that version ranges conform to a set of rules:
34+
35+
- that lower bounds are inclusive
36+
- that upper bounds are exclusive
37+
- that upper bounds don't have trailing zeros
38+
- that upper bounds are not missing
39+
- that upper bounds are not missing for ``base``
40+
41+
With large projects with many packages, it would be a lot of work to keep all
42+
package dependency version ranges up to date. Ways of overcoming this are:
43+
44+
- use a package generator like ``hpack-dhall-cabal`` to import sets of dependencies with version ranges
45+
- use a ``cabal.project`` file to specify version constraints for all dependencies
46+
- use a curated set of packages and versions and import these into the project
47+
3148
Version constraints
3249
-------------------
3350

0 commit comments

Comments
 (0)