diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-06-23 03:23:44 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-06-23 03:48:22 +0200 |
commit | 1976980d4a272fb7fc3694c734bfc6825edfc721 (patch) | |
tree | 8460db1176c64895e9968447588953fac85fe7d6 /module/datetime/timespec.scm | |
parent | Remove all inline use-modules. (diff) | |
download | calp-1976980d4a272fb7fc3694c734bfc6825edfc721.tar.gz calp-1976980d4a272fb7fc3694c734bfc6825edfc721.tar.xz |
Centralize (almost) all exports to :export in define-module.
Diffstat (limited to 'module/datetime/timespec.scm')
-rw-r--r-- | module/datetime/timespec.scm | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/module/datetime/timespec.scm b/module/datetime/timespec.scm index 9bfcc402..03e8dd10 100644 --- a/module/datetime/timespec.scm +++ b/module/datetime/timespec.scm @@ -4,16 +4,23 @@ ;;; Code: (define-module (datetime timespec) - :export (make-timespec - timespec? timespec-time timespec-sign timespec-type) - :use-module ((hnh util) :select (set define*-public unless)) + :use-module ((hnh util) :select (set unless)) :use-module ((hnh util exceptions) :select (warning)) :use-module (datetime) :use-module (srfi srfi-1) :use-module (srfi srfi-71) :use-module (srfi srfi-9 gnu) :use-module (calp translation) - ) + :export (make-timespec + timespec? + timespec-time + timespec-sign + timespec-type + + timespec-zero + timespec-add + parse-time-spec + )) ;; timespec as defined by the TZ-database @@ -30,10 +37,10 @@ ;; u, g, z - Universal time (type timespec-type)) ; char -(define-public (timespec-zero) +(define (timespec-zero) (make-timespec (time) '+ #\w)) -(define-public (timespec-add . specs) +(define (timespec-add . specs) (unless (apply eqv? (map timespec-type specs)) (warning (_ "Adding timespecs of differing types"))) @@ -70,7 +77,7 @@ specs)) -(define*-public (parse-time-spec +(define* (parse-time-spec string optional: (suffixes '(#\s #\w #\u #\g #\z))) (let ((type string (cond [(string-rindex string (list->char-set suffixes)) |