diff options
author | Andy Wingo <wingo@pobox.com> | 2019-10-27 21:28:21 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2019-10-27 21:31:18 +0100 |
commit | f963bdf02d7dd316884ccc9d590b3a7327406422 (patch) | |
tree | 2586cfc78892048f0c740213bf4cb134ddfe1127 /module/srfi | |
parent | 7a8e314d31ef8d40dd692bc27a93bc30c328e2b7 (diff) | |
download | guile-f963bdf02d7dd316884ccc9d590b3a7327406422.tar.gz |
Rename final? record type flag; add support for opaque?
* 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.
Diffstat (limited to 'module/srfi')
-rw-r--r-- | module/srfi/srfi-35.scm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/module/srfi/srfi-35.scm b/module/srfi/srfi-35.scm index ffb372632..e4246bb7d 100644 --- a/module/srfi/srfi-35.scm +++ b/module/srfi/srfi-35.scm @@ -62,7 +62,7 @@ ;; FIXME: Perhaps use a `define-record-type' which allows for parent types. (define &condition - (make-record-type '&condition '() print-condition #:final? #f)) + (make-record-type '&condition '() print-condition #:extensible? #t)) (define (make-condition-type id parent field-names) "Return a new condition type named @var{id}, inheriting from @@ -72,7 +72,8 @@ not contain names already used by @var{parent} or one of its supertypes." (unless (condition-type? parent) (error "parent is not a condition type" parent)) - (make-record-type id field-names print-condition #:final? #f #:parent parent)) + (make-record-type id field-names print-condition #:parent parent + #:extensible? #t)) (define (condition-type? obj) "Return true if OBJ is a condition type." |