8.0
5 Package Definition Versions
A package definition has a version.
A version is a combination of an edition and a revision.
5.1 Editions
An edition is a non-empty string.
The default name for an edition is "default".
An edition has at least one revision.
5.2 Revisions
A revision is either a revision number or a revision name.
A revision number is an exact non-negative integer.
A revision name is a string alias for a revision number.
A revision name should not repeat within an edition, but may repeat across editions.
Revision numbers start counting from 0.
5.3 Package Version API
(require xiden/version) | package: xiden |
value
Returns #t if the input value is useable as a revision number.
Returns #t if the input value is a string that, when converted to a
number, is useable as a revision number.
procedure
v : any/c
procedure
v : revision-number-variant?
Returns a revision number in terms of a variant type.
procedure
v : revision-number-variant?
Returns a revision number string in terms of a variant type.
procedure
(make-revision-interval lo hi #:lo-exclusive lo-exclusive #:hi-exclusive hi-exclusive)
→
revision-number? revision-number? lo : (or/c revision-number? #f) hi : (or/c revision-number? #f) lo-exclusive : any/c hi-exclusive : any/c
Creates a possibly invalid integer interval using
(values (if (and lo lo-exclusive) (add1 lo) lo) (if (and hi hi-exclusive) (sub1 hi) hi))
lo and hi may be #f to capture cases where revision names cannot map to revision numbers. In that case, the corresponding interval bound will also be #f.