summaryrefslogtreecommitdiff
path: root/module/srfi
AgeCommit message (Collapse)AuthorFilesLines
2019-11-14SRFI-18 uses core exceptionsAndy Wingo1-86/+60
* module/ice-9/boot-9.scm (exception-kind, exception-args): Export. * module/ice-9/exceptions.scm (exception-kind, exception-args): Re-export. * module/srfi/srfi-18.scm: Rewrite exception support in terms of core exceptions, not SRFI-34/35. * test-suite/tests/srfi-18.test: Since Guile doesn't expose the current exception handler as such, SRFI-18 captures it using delimited continuations. This means that we can't compare the result of (current-exception-handler) with the installed handler using eq?, even though the procedures are indeed equivalent. So, instead test handler behavior.
2019-11-13Rebase throw/catch on top of raise-exception/with-exception-handlerAndy Wingo1-32/+20
* libguile/exceptions.c: * libguile/exceptions.h: New files. * libguile.h: Add exceptions.h. * libguile/Makefile.am (libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES): (DOT_X_FILES, DOT_DOC_FILES, modinclude_HEADERS): Add exceptions.c and exceptions.h. * libguile/init.c (scm_i_init_guile): Initialize exceptions. * libguile/threads.c (scm_spawn_thread): Use new names for scm_i_make_catch_handler and scm_c_make_thunk. * libguile/throw.c: Rewrite to be implemented in terms of with-exception-handler / raise-exception. * libguile/throw.h: Use data types from exceptions.h. Move scm_report_stack_overflow and scm_report_out_of_memory to exceptions.[ch]. * module/ice-9/boot-9.scm (&error, &programming-error) (&non-continuable, make-exception-from-throw, raise-exception) (with-exception-handler): New top-level definitions. (throw, catch, with-throw-handler): Rewrite in terms of with-exception-handler and raise-exception. : New top-level definitions. * module/ice-9/exceptions.scm: Adapt to re-export &error, &programming-error, &non-continuable, raise-exception, and with-exception-handler from boot-9. (make-quit-exception, guile-quit-exception-converter): New exception converters. (make-exception-from-throw): Override core binding. * test-suite/tests/eval.test ("inner trim with prompt tag"): Adapt to "with-exception-handler" being the procedure on the stack. ("outer trim with prompt tag"): Likewise. * test-suite/tests/exceptions.test (throw-test): Use pass-if-equal. * module/srfi/srfi-34.scm: Reimplement in terms of core exceptions, and make "guard" actually re-raise continuations with the original "raise" continuation.
2019-11-04Rebase SRFI-35 on top of (ice-9 exceptions)Andy Wingo1-179/+69
* module/ice-9/exceptions.scm (exception-type?): New export. * module/srfi/srfi-35.scm: Rewrite in terms of (ice-9 exceptions).
2019-11-03Add `record-type-has-parent?'.Andy Wingo1-6/+2
* module/ice-9/boot-9.scm (record-type-has-parent?): New function. * module/srfi/srfi-35.scm (condition-type?): Use it.
2019-10-27Rename final? record type flag; add support for opaque?Andy Wingo1-2/+3
* module/ice-9/boot-9.scm (record-type-extensible?): Rename from record-type-final?, with the opposite sense. (record-type-opaque?): New accessor. (make-record-type): Change #:final? to #:extensible?, with the opposite meaning. Add #:opaque? arg. * test-suite/tests/records.test ("records"): Add opaque tests; update extensible tests. * doc/ref/api-data.texi (Records): Update. * module/srfi/srfi-35.scm (&condition, make-condition-type): Update for make-record-type API change.
2019-10-23Rebase srfi-35 conditions on top of make-record-typeAndy Wingo1-231/+135
* module/srfi/srfi-35.scm: Import (ice-9 match), and remove now-unused srfi-1 import. (print-condition): Print more like records, as appears to be the intention. (&condition): Define using make-record-type. Adapt all callers. Also, compound conditions are now a disjoint type, handled specially by condition-ref, condition?, and so on. * test-suite/tests/srfi-35.test (v3): Fix an error in which a subcondition was initialized without initializers for all of its fields.
2019-10-23SRFI-9 uses make-record-typeAndy Wingo1-12/+7
* module/srfi/srfi-9.scm (%define-record-type): Use make-record-type, instead of rolling our own vtable. Shouldn't have any perf impact.
2019-10-22Allow records to be subtypedAndy Wingo1-1/+4
* module/ice-9/boot-9.scm (record-type-vtable): Add slots for "flags" and a parent vector. (record-type-name, record-type-fields): Move up in the file. (record-type-constructor, record-type-flags, record-type-parents): New accessors. (make-record-type): Take #:final? and #:parent keyword arguments. (record-constructor): Delegate to record-type-constructor. (record-predicate): For non-final types --types that can be extended by subtyping -- implement an O(1) type predicate. (define-record-type): Initialize the new fields. * module/srfi/srfi-9.scm (%define-record-type): Initialize flags and parent fields.
2019-09-27Deprecate passing a non-zero size to make-moduleAndy Wingo1-1/+1
* module/ice-9/boot-9.scm (make-module): Issue a deprecation warning if users pass a non-zero size. (nested-define-module!, make-modules-in, beautify-user-module!) (resolve-interface, make-autoload-interface, %cond-expand-table): * module/ice-9/popen.scm (port/pid-table): * module/ice-9/session.scm (make-fold-modules): * module/language/ecmascript/function.scm (*program-wrappers*): * module/scripts/api-diff.scm (read-api-alist-file): * module/srfi/srfi-10.scm (reader-ctors): Update callers. Also remove some make-hash-table sizes.
2019-08-02Merge from stable-2.2Andy Wingo1-11/+11
2019-06-18SRFI-19: Rename 'tai-epoch-in-jd' to 'utc-epoch-in-jd'.Mark H Weaver1-11/+11
* module/srfi/srfi-19.scm: Rename 'tai-epoch-in-jd' to 'utc-epoch-in-jd', to reflect its actual meaning and usage.
2019-05-23Support ~N in SRFI-19 string->dateDaniel Llorens1-0/+22
* module/srfi/srfi-19.scm (fractional-integer-reader, make-fractional-integer-reader): From reference implementation. (reader-directives): Handle #\N, from reference implementation. * test-suite/tests/srfi-19: Add tests for string->date ~N. * doc/ref/srfi-modules.texi (string->date): Add line for ~N.
2019-05-23SRFI-19: Minor refactor of leap second table lookups.Mark H Weaver1-28/+22
* module/srfi/srfi-19.scm (leap-second-delta): Replace with ... (utc->tai): ... this. (leap-second-neg-delta): Replace with ... (tai->utc): ... this. (current-time-tai, priv:time-tai->time-utc!, priv:time-utc->time-tai!) (time-tai->julian-day, time-monotonic->julian-day): Adapt accordingly.
2019-05-23SRFI-19: time-utc->date: Support non-integer nanoseconds values.Mark H Weaver1-1/+1
* module/srfi/srfi-19.scm (time-utc->date): Use 'floor-remainder' instead of 'modulo'.
2019-05-23SRFI-19: Check for incompatible types in time comparisons.Mark H Weaver1-7/+12
Fixes <https://bugs.gnu.org/26163>. Reported by Zefram <zefram@fysh.org>. * module/srfi/srfi-19.scm (time-compare-check): New procedure. (time=?): Use 'time-compare-check' to check the arguments and raise an error in case of mismatched types. Previously, mismatched types would cause time=? to return #f. (time>?, time<?, time>=?, time<=?, time-difference!): Use 'time-compare-check' to check the arguments.
2019-05-23SRFI-19: Fix normalization of seconds and nanoseconds in time records.Mark H Weaver1-18/+16
Fixes <https://bugs.gnu.org/26162>. Reported by Zefram <zefram@fysh.org>. * module/srfi/srfi-19.scm (time-normalize!): Rewrite. * test-suite/tests/srfi-19.test: Add tests.
2019-05-23SRFI-19: Fix handling of negative years and negative julian days.Mark H Weaver1-27/+38
Fixes <https://bugs.gnu.org/21906>. Mitigates <https://bugs.gnu.org/21903> and <https://bugs.gnu.org/21904>. Reported by: Zefram <zefram@fysh.org>. * module/srfi/srfi-19.scm (encode-julian-day-number) (decode-julian-day-number, date-week-number): Use 'floor-quotient' instead of 'quotient', and 'floor' instead of 'truncate', where appropriate. (time-utc->date): Ensure that the 'nanoseconds' field of the returned date is non-negative. (leap-year): Handle negative years properly, and reformulate the computation. (week-day): Handle negative years properly. Use 'floor-quotient' instead of 'quotient' where appropriate. (directives): In the handler for '~Y' format escapes, improve the handling of years outside of the range 0-9999. (read-directives): Add a FIXME comment to fix the '~Y' reader to handle years outside of the range 0-9999. * test-suite/tests/srfi-19.test: Import (srfi srfi-1). Use Guile's modern keyword notation in the 'define-module' form. Add more tests.
2019-05-23SRFI-19: Fix TAI->UTC conversions, leap second handling, etc.Mark H Weaver1-87/+58
Fixes <https://bugs.gnu.org/21911>. Fixes <https://bugs.gnu.org/22034>. Fixes <https://bugs.gnu.org/21902>. Partially fixes <https://bugs.gnu.org/21904>. Reported by Zefram <zefram@fysh.org>. * doc/ref/srfi-modules.texi (SRFI-19 Introduction): Fix the definitions of Julian Day and Modified Julian Day. Give the correct full names of UTC and TAI. * module/srfi/srfi-19.scm: Import (srfi srfi-1). Use modern Guile keyword syntax in the 'define-module' form. (leap-second-neg-delta): New procedure, derived from a similar procedure in the latest upstream SRFI-19 reference implementation. (priv:time-tai->time-utc!, time-tai->julian-day) (time-monotonic->julian-day): Use 'leap-second-neg-delta'. (local-tz-offset): Fix comment. (leap-second?): Remove. (tai-before-leap-second?): New procedure, derived from upstream SRFI-19. (time-utc->date): Use 'define*' to handle the optional argument. Remove the leap second handling, following upstream SRFI-19. (time-tai->date): Rewrite in terms of 'time-utc->date'. Add special leap second handling, following upstream SRFI-19. (time-monotonic->date): Rewrite in terms of 'time-tai->date'. (date->time-tai, date->time-monotonic): Add special leap second handling, following upstream SRFI-19. (directives): In the entry for the "~Y" escape in 'date->string', pad the year field to 4 characters, following upstream SRFI-19. * test-suite/tests/srfi-19.test: Add tests.
2019-05-23Fix typos, indentation and error reporting in SRFI-19.Mark H Weaver1-91/+99
* module/srfi/srfi-19.scm: Fix typos in comments, indentation, and pass the correct 'caller' name to 'time-error' in several places.
2019-05-23Update SRFI-19 leap second table.Mark H Weaver1-1/+2
* module/srfi/srfi-19.scm (leap-second-table): Update to include the leap second on 1 January 2017.
2018-12-11Support ~N in SRFI-19 string->dateDaniel Llorens1-0/+22
* module/srfi/srfi-19.scm (fractional-integer-reader, make-fractional-integer-reader): From reference implementation. (reader-directives): Handle #\N, from reference implementation. * test-suite/tests/srfi-19: Add tests for string->date ~N. * doc/ref/srfi-modules.texi (string->date): Add line for ~N.
2018-10-24SRFI-19: Minor refactor of leap second table lookups.Mark H Weaver1-28/+22
* module/srfi/srfi-19.scm (leap-second-delta): Replace with ... (utc->tai): ... this. (leap-second-neg-delta): Replace with ... (tai->utc): ... this. (current-time-tai, priv:time-tai->time-utc!, priv:time-utc->time-tai!) (time-tai->julian-day, time-monotonic->julian-day): Adapt accordingly.
2018-10-24SRFI-19: time-utc->date: Support non-integer nanoseconds values.Mark H Weaver1-1/+1
* module/srfi/srfi-19.scm (time-utc->date): Use 'floor-remainder' instead of 'modulo'.
2018-10-21SRFI-19: Check for incompatible types in time comparisons.Mark H Weaver1-7/+12
Fixes <https://bugs.gnu.org/26163>. Reported by Zefram <zefram@fysh.org>. * module/srfi/srfi-19.scm (time-compare-check): New procedure. (time=?): Use 'time-compare-check' to check the arguments and raise an error in case of mismatched types. Previously, mismatched types would cause time=? to return #f. (time>?, time<?, time>=?, time<=?, time-difference!): Use 'time-compare-check' to check the arguments.
2018-10-21SRFI-19: Fix normalization of seconds and nanoseconds in time records.Mark H Weaver1-18/+16
Fixes <https://bugs.gnu.org/26162>. Reported by Zefram <zefram@fysh.org>. * module/srfi/srfi-19.scm (time-normalize!): Rewrite. * test-suite/tests/srfi-19.test: Add tests.
2018-10-20SRFI-19: Fix handling of negative years and negative julian days.Mark H Weaver1-27/+38
Fixes <https://bugs.gnu.org/21906>. Mitigates <https://bugs.gnu.org/21903> and <https://bugs.gnu.org/21904>. Reported by: Zefram <zefram@fysh.org>. * module/srfi/srfi-19.scm (encode-julian-day-number) (decode-julian-day-number, date-week-number): Use 'floor-quotient' instead of 'quotient', and 'floor' instead of 'truncate', where appropriate. (time-utc->date): Ensure that the 'nanoseconds' field of the returned date is non-negative. (leap-year): Handle negative years properly, and reformulate the computation. (week-day): Handle negative years properly. Use 'floor-quotient' instead of 'quotient' where appropriate. (directives): In the handler for '~Y' format escapes, improve the handling of years outside of the range 0-9999. (read-directives): Add a FIXME comment to fix the '~Y' reader to handle years outside of the range 0-9999. * test-suite/tests/srfi-19.test: Import (srfi srfi-1). Use Guile's modern keyword notation in the 'define-module' form. Add more tests.
2018-10-20SRFI-19: Fix TAI->UTC conversions, leap second handling, etc.Mark H Weaver1-87/+58
Fixes <https://bugs.gnu.org/21911>. Fixes <https://bugs.gnu.org/22034>. Fixes <https://bugs.gnu.org/21902>. Partially fixes <https://bugs.gnu.org/21904>. Reported by Zefram <zefram@fysh.org>. * doc/ref/srfi-modules.texi (SRFI-19 Introduction): Fix the definitions of Julian Day and Modified Julian Day. Give the correct full names of UTC and TAI. * module/srfi/srfi-19.scm: Import (srfi srfi-1). Use modern Guile keyword syntax in the 'define-module' form. (leap-second-neg-delta): New procedure, derived from a similar procedure in the latest upstream SRFI-19 reference implementation. (priv:time-tai->time-utc!, time-tai->julian-day) (time-monotonic->julian-day): Use 'leap-second-neg-delta'. (local-tz-offset): Fix comment. (leap-second?): Remove. (tai-before-leap-second?): New procedure, derived from upstream SRFI-19. (time-utc->date): Use 'define*' to handle the optional argument. Remove the leap second handling, following upstream SRFI-19. (time-tai->date): Rewrite in terms of 'time-utc->date'. Add special leap second handling, following upstream SRFI-19. (time-monotonic->date): Rewrite in terms of 'time-tai->date'. (date->time-tai, date->time-monotonic): Add special leap second handling, following upstream SRFI-19. (directives): In the entry for the "~Y" escape in 'date->string', pad the year field to 4 characters, following upstream SRFI-19. * test-suite/tests/srfi-19.test: Add tests.
2018-10-16Fix typos, indentation and error reporting in SRFI-19.Mark H Weaver1-91/+99
* module/srfi/srfi-19.scm: Fix typos in comments, indentation, and pass the correct 'caller' name to 'time-error' in several places.
2018-10-16Update SRFI-19 leap second table.Mark H Weaver1-1/+2
* module/srfi/srfi-19.scm (leap-second-table): Update to include the leap second on 1 January 2017.
2018-08-07srfi-19: Remove unused procedure.Ludovic Courtès1-19/+1
* module/srfi/srfi-19.scm (date->broken-down-time): Remove.
2018-08-07Make srfi-71 visible through 'cond-expand'.Mark H Weaver1-0/+2
This is a followup to commit eb90831ce81bcb85ae96d27011ebe71955cdf75d. * module/srfi/srfi-71.scm: Add missing 'cond-expand-provide'.
2018-08-07build: Really build srfi/srfi-71.scm.Ludovic Courtès1-53/+0
Commit eb90831ce81bcb85ae96d27011ebe71955cdf75d added it to the wrong makefile. * module/Makefile.am (SOURCES): Add srfi/srfi-71.scm. * module/srfi/Makefile.am: Remove. It's a leftover from the 2009 build system rework in commit 3bb299b3f0d5b31957a6447d095ed723268019be.
2018-08-07Add SRFI 71: Extended LET-syntax for multiple values.Christopher Allan Webber2-1/+267
* module/srfi/srfi-71.scm: New file. * module/srfi/Makefile.am: Add it. * doc/ref/srfi-modules.texi: Document it. * NEWS: Update. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2018-08-07srfi-18: 'thread-sleep!' timeout-as-a-number is relative.Ludovic Courtès1-3/+3
This is a followup to <https://bugs.gnu.org/29704>. * module/srfi/srfi-18.scm (thread-sleep!): When TIMEOUT is a number, keep it as-is. * test-suite/tests/srfi-18.test ("thread sleep with number"): Pass 0 as the timeout. ("thread sleeps fractions of a second"): Pass 0.5 as the timeout.
2018-08-07srfi-18: When timeout is a number, it's a relative number of seconds.Ludovic Courtès1-16/+28
Fixes <https://bugs.gnu.org/29704>. Reported by David Beswick <dlbeswick@gmail.com>. * module/srfi/srfi-18.scm (timeout->absolute-time): New procedure. (mutex-lock!): Use it in 'thread:lock-mutex' call. (mutex-unlock!): Use it. * test-suite/tests/srfi-18.test ("mutex-lock! returns false on timeout") ("mutex-lock! returns true when lock obtained within timeout") ("recursive lock waits") ("mutex unlock is false when condition times out"): Adjust cases where the 'timeout' parameter is a number so that it's a relative number.
2018-07-24srfi-19: Remove unused procedure.Ludovic Courtès1-19/+1
* module/srfi/srfi-19.scm (date->broken-down-time): Remove.
2018-07-04Make srfi-71 visible through 'cond-expand'.Mark H Weaver1-0/+2
This is a followup to commit eb90831ce81bcb85ae96d27011ebe71955cdf75d. * module/srfi/srfi-71.scm: Add missing 'cond-expand-provide'.
2018-07-01build: Really build srfi/srfi-71.scm.Ludovic Courtès1-53/+0
Commit eb90831ce81bcb85ae96d27011ebe71955cdf75d added it to the wrong makefile. * module/Makefile.am (SOURCES): Add srfi/srfi-71.scm. * module/srfi/Makefile.am: Remove. It's a leftover from the 2009 build system rework in commit 3bb299b3f0d5b31957a6447d095ed723268019be.
2018-06-18Add SRFI 71: Extended LET-syntax for multiple values.Christopher Allan Webber2-1/+267
* module/srfi/srfi-71.scm: New file. * module/srfi/Makefile.am: Add it. * doc/ref/srfi-modules.texi: Document it. * NEWS: Update. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2018-02-16srfi-18: 'thread-sleep!' timeout-as-a-number is relative.Ludovic Courtès1-3/+3
This is a followup to <https://bugs.gnu.org/29704>. * module/srfi/srfi-18.scm (thread-sleep!): When TIMEOUT is a number, keep it as-is. * test-suite/tests/srfi-18.test ("thread sleep with number"): Pass 0 as the timeout. ("thread sleeps fractions of a second"): Pass 0.5 as the timeout.
2018-02-16srfi-18: When timeout is a number, it's a relative number of seconds.Ludovic Courtès1-16/+28
Fixes <https://bugs.gnu.org/29704>. Reported by David Beswick <dlbeswick@gmail.com>. * module/srfi/srfi-18.scm (timeout->absolute-time): New procedure. (mutex-lock!): Use it in 'thread:lock-mutex' call. (mutex-unlock!): Use it. * test-suite/tests/srfi-18.test ("mutex-lock! returns false on timeout") ("mutex-lock! returns true when lock obtained within timeout") ("recursive lock waits") ("mutex unlock is false when condition times out"): Adjust cases where the 'timeout' parameter is a number so that it's a relative number.
2018-01-21Introduce make-struct/simpleAndy Wingo1-27/+24
* libguile/struct.h: * libguile/struct.c (scm_make_struct_simple): New function. * module/ice-9/boot-9.scm (make-record-type): Recast in terms of make-struct/simple. * module/ice-9/eval.scm (primitive-eval): Remove allocate-struct case. * module/srfi/srfi-9.scm (%%set-fields, %define-record-type): Use make-struct/simple.
2018-01-05Improve compilation of make-vector without initAndy Wingo1-5/+9
* module/language/tree-il/primitives.scm (*primitive-expand-table*): Add expansion for one-argument make-vector.
2017-09-23Replace "pr" struct fields with "pw" fieldsAndy Wingo1-3/+3
* libguile/struct.h (SCM_VTABLE_BASE_LAYOUT): Layout is a "pr" field. * module/ice-9/boot-9.scm (record-type-vtable): Record vtable fields are writable. (<parameter>): "pw" fields. * module/oop/goops.scm (<class>, %compute-layout): <read-only> fields are "pw" underneath. * module/rnrs/records/procedural.scm (record-type-vtable) (record-constructor-vtable, make-record-type-descriptor): Use "pw" fields in vtables. * module/srfi/srfi-35.scm (%condition-type-vtable) (struct-layout-for-condition): "pw" fields in vtables. * test-suite/tests/goops.test: * test-suite/tests/structs.test: Use "pw" fields only. * benchmark-suite/benchmarks/structs.bm: Update for make-struct/no-tail, to use pw fields, and also to remove useless tests that the compiler would optimize away. * doc/ref/api-data.texi (Vtables): Add a note about the now-vestigial permissions character and update documentation. (Structure Basics, Meta-Vtables): Update examples. * libguile/hash.c (scm_i_struct_hash): Remove code that would handle opaque/self fields. * libguile/print.h (SCM_PRINT_STATE_LAYOUT): Use "pw" fields. * libguile/struct.c (scm_struct_init): Simplify check for hidden fields. * libguile/values.c (scm_init_values): Field is "pw".
2017-09-22Merge stable-2.2 into masterAndy Wingo1-11/+11
This commit resolves conflicts by removing the deprecated make-struct.
2017-09-20Use make-struct/no-tail instead of make-structAndy Wingo1-11/+11
* module/ice-9/boot-9.scm: * module/language/cps/effects-analysis.scm: * module/language/elisp/falias.scm: * module/language/tree-il.scm: * module/language/tree-il/primitives.scm: * module/rnrs/records/procedural.scm: * module/srfi/srfi-35.scm: * module/system/base/syntax.scm: Change uses of make-struct to make-struct/no-tail.
2017-09-14remove self field of vtablesAndy Wingo1-1/+0
* libguile/struct.h (SCM_VTABLE_BASE_LAYOUT, scm_vtable_index_self): Remove "self" field. Renumber the other fields. * module/oop/goops.scm (<self-slot>): Remove. (fold-class-slots): Adapt for "self" slot removal. Adapt all users. (class-redefinition): Now that there is no "self" slot to update, use %modify-instance instead of %modify-class. * libguile/goops.c (class_self): Remove. (scm_sys_modify_class): Remove. * libguile/goops.h (scm_sys_modify_class): Remove. * module/rnrs/records/procedural.scm: Import vtable-offset-user. Renumber rtd indexes using vtable-offset-user. * module/srfi/srfi-35.scm (%condition-type-vtable): Remove mention of vtable fields. * module/system/base/types.scm (address->inferior-struct): Adapt for different vtable field layout.
2017-04-22SRFI-19: Swap seconds and nanoseconds in 'current-time-monotonic'.Ludovic Courtès1-2/+2
* module/srfi/srfi-19.scm (current-time-monotonic): Swap the 2nd and 3rd arguments. Fixes a regression introduced in commit b11e2922c36c4105797c269c7e616535b702698a.
2017-04-20SRFI-37: Account for zero-length arguments.Thomas Danckaert1-1/+2
* module/srfi/srfi-37.scm (args-fold): When checking if an argument is an option (starts with #\-), first check if the length is non-zero.
2017-04-19Fix date->string ~f operator to not emit leading zerosAndy Wingo1-18/+8
* module/srfi/srfi-19.scm (directives): Format ~f without leading zeroes. Fixes https://bugs.gnu.org/26260. * test-suite/tests/srfi-19.test ("SRFI date/time library"): Add test.