Previous: , Up: libutils refs   [Index]


7.2.4 Conformity among library references and names

The following bindings are exported by the library (vicare libraries).

Function: conforming-sub-version-and-sub-version-reference? sub-version sub-version-reference

Interpret sub-version as a sub–version number as specified by R6RS and sub-version-reference as a sub–version reference as specified by R6RS. Return #t if the sub–version conforms to the sub–version reference; else return #f; if the arguments are invalid: raise an assertion violation.

(conforming-sub-version-and-sub-version-reference?
    1 1)
⇒ #t

(conforming-sub-version-and-sub-version-reference?
    1 0)
⇒ #f

(conforming-sub-version-and-sub-version-reference?
    1 '(<= 1))
⇒ #t

(conforming-sub-version-and-sub-version-reference?
    2 '(<= 1))
⇒ #f

(conforming-sub-version-and-sub-version-reference?
    0 '(<= 1))
⇒ #t

(conforming-sub-version-and-sub-version-reference?
    1 '(>= 1))
⇒ #t

(conforming-sub-version-and-sub-version-reference?
    2 '(>= 1))
⇒ #t

(conforming-sub-version-and-sub-version-reference?
    0 '(>= 1))
⇒ #f

(conforming-sub-version-and-sub-version-reference?
    1 '(not 1))
⇒ #f

(conforming-sub-version-and-sub-version-reference?
    1 '(not 0))
⇒ #t

(conforming-sub-version-and-sub-version-reference?
    1 '(or 1 2))
⇒ #t

(conforming-sub-version-and-sub-version-reference?
    1 '(or 2 1))
⇒ #t

(conforming-sub-version-and-sub-version-reference?
    1 '(or 2 3))
⇒ #f

(conforming-sub-version-and-sub-version-reference?
    1 '(or 2 3 4))
⇒ #f

(conforming-sub-version-and-sub-version-reference?
    4 '(or 2 3 4))
⇒ #t

(conforming-sub-version-and-sub-version-reference?
    1 '(and (>= 0) (<= 2)))
⇒ #t

(conforming-sub-version-and-sub-version-reference?
    0 '(and (>= 0) (<= 2)))
⇒ #t

(conforming-sub-version-and-sub-version-reference?
    1 '(and (>= 0) (<= 2) (not 3)))
⇒ #t

(conforming-sub-version-and-sub-version-reference?
    1 '(and (>= 0) (<= 2) (not 1)))
⇒ #f


(conforming-sub-version-and-sub-version-reference?
    4 '(or (and (>= 0) (<= 2)) 4))
⇒ #t

(conforming-sub-version-and-sub-version-reference?
    3 '(or (and (>= 0) (<= 2)) 4))
⇒ #f
Function: conforming-version-and-version-reference? version1 version-reference2

Interpret version as a version symbolic expression as specified by R6RS and version-reference as a version reference symbolic expression as specified by R6RS. Return #t if the version conforms to the version reference; else return #f; if the arguments are invalid: raise an assertion violation.

(conforming-version-and-version-reference?
    '() '())
⇒ #t

(conforming-version-and-version-reference?
    '(1) '())
⇒ #t

(conforming-version-and-version-reference?
    '() '(1))
⇒ #f

(conforming-version-and-version-reference?
    '(1) '(1))
⇒ #t

(conforming-version-and-version-reference?
    '(1) '(0))
⇒ #f

(conforming-version-and-version-reference?
    '(1) '((<= 1)))
⇒ #t

(conforming-version-and-version-reference?
    '(2) '((<= 1)))
⇒ #f

(conforming-version-and-version-reference?
    '(0) '((<= 1)))
⇒ #t

(conforming-version-and-version-reference?
    '(1) '((>= 1)))
⇒ #t

(conforming-version-and-version-reference?
    '(2) '((>= 1)))
⇒ #t

(conforming-version-and-version-reference?
    '(0) '((>= 1)))
⇒ #f

(conforming-version-and-version-reference?
    '(1) '((not 1)))
⇒ #f

(conforming-version-and-version-reference?
    '(1) '((not 0)))
⇒ #t

(conforming-version-and-version-reference?
    '(1) '((or 1 2)))
⇒ #t

(conforming-version-and-version-reference?
    '(1) '((or 2 1)))
⇒ #t

(conforming-version-and-version-reference?
    '(1) '((or 2 3)))
⇒ #f

(conforming-version-and-version-reference?
    '(1) '((or 2 3 4)))
⇒ #f

(conforming-version-and-version-reference?
    '(4) '((or 2 3 4)))
⇒ #t

(conforming-version-and-version-reference?
    '(5) '((or 2 (or 3 (or 4 (or 5))))))
⇒ #t

(conforming-version-and-version-reference?
    '(1) '((and 1)))
⇒ #t

(conforming-version-and-version-reference?
    '(1) '((and 1 1)))
⇒ #t

(conforming-version-and-version-reference?
    '(1) '((and 1 1 1)))
⇒ #t

(conforming-version-and-version-reference?
    '(1) '((and 1 (and 1 (and 1 (and 1))))))
⇒ #t

(conforming-version-and-version-reference?
    '(1) '((and (>= 0) (<= 2))))
⇒ #t

(conforming-version-and-version-reference?
    '(0) '((and (>= 0) (<= 2))))
⇒ #t

(conforming-version-and-version-reference?
    '(2) '((and (>= 0) (<= 2))))
⇒ #t

(conforming-version-and-version-reference?
    '(1) '((and (>= 0) (<= 2) (not 3))))
⇒ #t

(conforming-version-and-version-reference?
    '(1) '((and (>= 0) (<= 2) (not 1))))
⇒ #f

(conforming-version-and-version-reference?
    '(1) '((or (and (>= 0) (<= 2)) 4)))
⇒ #t

(conforming-version-and-version-reference?
    '(4) '((or (and (>= 0) (<= 2)) 4)))
⇒ #t

(conforming-version-and-version-reference?
    '(3) '((or (and (>= 0) (<= 2)) 4)))
⇒ #f

(conforming-version-and-version-reference?
    '(1 2 3) '(1 2 3))
⇒ #t

(conforming-version-and-version-reference?
    '(1 2 3) '(1 2 4))
⇒ #f

(conforming-version-and-version-reference?
    '(1 2 0) '(1 2))
⇒ #t

(conforming-version-and-version-reference?
    '(1 2 1) '(1 2))
⇒ #t

(conforming-version-and-version-reference?
    '(1 2 3)
    '(1 (>= 1) (not 1)))
⇒ #t

(conforming-version-and-version-reference?
    '(1 2 3)
    '(1 (<= 1) (not 1)))
⇒ #f

(conforming-version-and-version-reference?
    '(1 2 3)
    '(or (1 (<= 1) (not 1)) (1 (>= 1) (not 1))))
⇒ #t

(conforming-version-and-version-reference?
    '(1 2 3) '(or (1 2 5) (1 2 10)))
⇒ #f

(conforming-version-and-version-reference?
    '(1 2 3)
    '(and (1 (>= 1) (not 1)) (1 2 (not 5))))
⇒ #t

(conforming-version-and-version-reference?
    '(1 2 3)
    '(and (1 (<= 1) (not 1)) (1 2 (not 5))))
⇒ #f)

(conforming-version-and-version-reference?
    '(1 2 3) '(not (1 5 4)))
⇒ #t

(conforming-version-and-version-reference?
    '(1 2 3) '(not (1 2 3)))
⇒ #f
Function: conforming-library-name-and-library-reference? name reference

Interpret name as a library name symbolic expression as specified by R6RS and reference as a library reference symbolic expression as specified by R6RS. Return #t if the name conforms to the reference; else return #f; if the arguments are invalid: raise an assertion violation.

(conforming-library-name-and-library-reference?
    '(a (1)) '(a (1)))
⇒ #t

(conforming-library-name-and-library-reference?
    '(a (1)) '(a (0)))
⇒ #f

(conforming-library-name-and-library-reference?
    '(a b c (1)) '(a b c (1)))
⇒ #t

(conforming-library-name-and-library-reference?
    '(a b c (1)) '(a b c (0)))
⇒ #f

(conforming-library-name-and-library-reference?
    '(a b c (1)) '(a z c (1)))
⇒ #f

Previous: , Up: libutils refs   [Index]