;;;; semantic-version.element.scm -*- Scheme -*- ;;;; Kon Lovett, Apr '21 ;; Issues ;; ;; - Use symbol as ident impl, not string ;; ;; - Support Roman Numerals & Upper/Lowercase Letters ("outline numbers"). ;; ;; - Use interleaved elm chr in single sequence ;; ;; - Use vector (module semantic-version.element (;export version version-copy version-depth version-parts version-puncs) (import scheme utf8 (chicken base) (chicken type) (only (srfi 1) make-list list-copy every) (semantic-version core) (semantic-version components)) ;; ;NOTE symbols are not preserved; the printname is used! (include-relative "semantic-version.types") (: version (#!rest ver-part -> ver)) (: version-copy (ver -> ver)) (: version-depth (ver -> integer)) (: version-parts (ver -> ver-parts)) (: version-puncs (ver -> ver-puncs)) ;; (include-relative "semantic-version-internals") ;; (define (version . parts) (if (null? parts) (make-ver '() '()) (let ((parts (map version-component-literal (check-parts 'version parts)))) (make-ver parts (default-puncs parts))) ) ) (define (version-copy ver) (copy-ver (check-version 'version-copy ver))) (define (version-depth ver) (ver-depth (check-version 'version-depth ver))) (define (version-parts ver) (copy-ver-parts (check-version 'version-parts ver))) (define (version-puncs ver) (copy-ver-puncs (check-version 'version-puncs ver))) ) ;module semantic-version.element