aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--module/calp/util.scm2
-rw-r--r--tests/util.scm6
2 files changed, 6 insertions, 2 deletions
diff --git a/module/calp/util.scm b/module/calp/util.scm
index 9b792fe0..06767658 100644
--- a/module/calp/util.scm
+++ b/module/calp/util.scm
@@ -194,7 +194,7 @@
;; only evaluates the final form once
(define-syntax set/r!
- (syntax-rules ()
+ (syntax-rules (=)
((_ args ... v = something)
(begin
(set! args ... v = something)
diff --git a/tests/util.scm b/tests/util.scm
index ed5abfd1..57d2e538 100644
--- a/tests/util.scm
+++ b/tests/util.scm
@@ -8,7 +8,11 @@
'(3 4 5)
(filter-sorted (lambda (x) (<= 3 x 5)) (iota 10)))
-(test-equal "set/r! single"
+(test-equal "set/r! = single"
#f
(let ((x #t))
(set/r! x = not)))
+
+(test-error
+ 'syntax-error
+ (test-read-eval-string "(set/r! x err not)"))