project-metadata-utils icon indicating copy to clipboard operation
project-metadata-utils copied to clipboard

Add min/max functions to Constraint

Open malaire opened this issue 5 years ago • 1 comments

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.)

malaire avatar Dec 01 '18 12:12 malaire