summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--module/system/base/syntax.scm9
1 files changed, 5 insertions, 4 deletions
diff --git a/module/system/base/syntax.scm b/module/system/base/syntax.scm
index 35748bb79..867720cdb 100644
--- a/module/system/base/syntax.scm
+++ b/module/system/base/syntax.scm
@@ -47,10 +47,11 @@
,@(cdr def)))
rest)
,@(map (lambda (common-slot i)
- `(define (,(symbol-append (trim-brackets name)
- '- common-slot)
- x)
- (struct-ref x ,i)))
+ `(define ,(symbol-append (trim-brackets name)
+ '- common-slot)
+ (make-procedure-with-setter
+ (lambda (x) (struct-ref x ,i))
+ (lambda (x v) (struct-set! x ,i v)))))
common-slots (iota (length common-slots)))))))