|#
;;;; Structure Definition Macro
-;;; package: (runtime defstruct)
+;;; package: (runtime syntax defstruct)
(declare (usual-integrations))
\f
(field-names (map slot/name slots))
(inits
(map (lambda (slot)
- `(LAMBDA () ,(close (slot/default slot) context)))
+ (let ((default (slot/default slot)))
+ (if (false-marker? default)
+ #f
+ `(LAMBDA () ,(close default context)))))
slots)))
`((DEFINE ,type-name
,(if (structure/record-type? structure)
#f
"record-type"
'#(DISPATCH-TAG NAME FIELD-NAMES DEFAULT-INITS EXTENSION)
- (vector-cons 5 (lambda () #f))
+ (vector-cons 5 #f)
#f)))
(set! record-type-type-tag (make-dispatch-tag type))
(%record-set! type 0 record-type-type-tag)
#f
(->type-name type-name)
names
- (vector-cons n (lambda () #f))
+ (vector-cons n #f)
#f))
(tag (make-dispatch-tag record-type)))
(%record-set! record-type 1 tag)