project-metadata-utils
project-metadata-utils copied to clipboard
Add min/max functions to Constraint
For package dependency calculations I need to get the min/max value of Constraint
.
So I suggest adding two new functions which return min/max Version
:s and their associated Op
:s:
min : Constraint -> (Version, Op)
max : Constraint -> (Version, Op)
Note that this requires exposing Op(..)
.
(I removed my earlier idea here, this is better and can also have other uses with those exposes Op
:s, e.g. with custom conversion to string or something else.)