Simplify implementation slightly.
authorChris Hanson <org/chris-hanson/cph>
Tue, 2 Oct 2018 06:15:02 +0000 (23:15 -0700)
committerChris Hanson <org/chris-hanson/cph>
Tue, 2 Oct 2018 06:15:02 +0000 (23:15 -0700)
src/runtime/bundle.scm

index a031ca3d97a42fa722e23ec694555ae30024482d..25dab6e826c0bab2e50fd48ff2d44f3aec5b5f9e 100644 (file)
@@ -36,16 +36,8 @@ USA.
 
 (declare (usual-integrations))
 \f
-(define (make-bundle-predicate name #!optional parent-predicate)
-  (let ((type
-        (new-make-record-type name
-                              '()
-                              (if (default-object? parent-predicate)
-                                  <bundle>
-                                  (%predicate->record-type
-                                   (guarantee bundle-predicate?
-                                              parent-predicate
-                                              'make-bundle-predicate))))))
+(define (make-bundle-predicate name)
+  (let ((type (new-make-record-type name '() <bundle>)))
     (set-record-type-applicator! type %bundle-applicator)
     (record-predicate type)))
 
@@ -83,10 +75,14 @@ USA.
                 (symbol? (car p)))
               object)))
 \f
-(define-record-type <bundle>
-    (%unused% alist) ;change to #f after 9.3 release
-    bundle?
-  (alist bundle-alist))
+(define <bundle>
+  (new-make-record-type '<bundle> '(alist)))
+
+(define bundle?
+  (record-predicate <bundle>))
+
+(define bundle-alist
+  (record-accessor <bundle> 'alist))
 
 (define-print-method bundle?
   (standard-print-method