summaryrefslogtreecommitdiff
path: root/module/srfi
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2019-10-27 21:28:21 +0100
committerAndy Wingo <wingo@pobox.com>2019-10-27 21:31:18 +0100
commitf963bdf02d7dd316884ccc9d590b3a7327406422 (patch)
tree2586cfc78892048f0c740213bf4cb134ddfe1127 /module/srfi
parent7a8e314d31ef8d40dd692bc27a93bc30c328e2b7 (diff)
downloadguile-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.scm5
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."