Open phadej opened 2 years ago
And because of existence of
succVersion :: Version -> Version
succVersion v = mkVersion (versionNumbers v ++ [0])
The VersionInterval
implementation can be simplified.
>x.y.z --> >=x.y.z.0
<=x.y.z ---> <x.y.z.0
This would cause some "ugly" versions, but that is not an issue as most version intervals are >=x && <y
, i.e. inclusive lower bound and exclusive upper bound.
The only downside is that excluded version will look "funny": <3.1.4 || >3.1.4
normalized to <3.1.4 || >=3.1.4.0
By separated I mean that there would be a version between any pair of distinct versions. That is not true.
For example, there is no version between
1
and1.0
, andVersionInterval
machinery doesn't take that into account. It fails to simplify: