summaryrefslogtreecommitdiff
path: root/module/language/tree-il/primitives.scm
diff options
context:
space:
mode:
Diffstat (limited to 'module/language/tree-il/primitives.scm')
-rw-r--r--module/language/tree-il/primitives.scm6
1 files changed, 3 insertions, 3 deletions
diff --git a/module/language/tree-il/primitives.scm b/module/language/tree-il/primitives.scm
index 955c7bf25..98633f07a 100644
--- a/module/language/tree-il/primitives.scm
+++ b/module/language/tree-il/primitives.scm
@@ -208,11 +208,11 @@
(x) x
(x y) (if (and (const? y)
(let ((y (const-exp y)))
- (and (exact? y) (= y 1))))
+ (and (number? y) (exact? y) (= y 1))))
(1+ x)
(if (and (const? x)
(let ((x (const-exp x)))
- (and (exact? x) (= x 1))))
+ (and (number? y) (exact? x) (= x 1))))
(1+ y)
(+ x y)))
(x y z . rest) (+ x (+ y z . rest)))
@@ -226,7 +226,7 @@
(x) (- 0 x)
(x y) (if (and (const? y)
(let ((y (const-exp y)))
- (and (exact? y) (= y 1))))
+ (and (number? y) (exact? y) (= y 1))))
(1- x)
(- x y))
(x y z . rest) (- x (+ y z . rest)))