From 5b29db65b4df2349b83373383d8421ff8ef444e7 Mon Sep 17 00:00:00 2001 From: Joe Marshall Date: Sat, 5 Sep 2009 15:58:51 -0700 Subject: [PATCH] Revert eta-expansion change. --- src/runtime/sysmac.scm | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/runtime/sysmac.scm b/src/runtime/sysmac.scm index f4df40ecb..3550d67ef 100644 --- a/src/runtime/sysmac.scm +++ b/src/runtime/sysmac.scm @@ -34,9 +34,18 @@ USA. environment (let ((primitive-definition (lambda (variable-name primitive-args) - `(DEFINE-INTEGRABLE ,variable-name - ,(apply make-primitive-procedure primitive-args)) - ))) + (let ((primitive + (apply make-primitive-procedure primitive-args))) + (let ((arity (procedure-arity primitive))) + (if (eqv? (procedure-arity-min arity) + (procedure-arity-max arity)) + (let ((names + (map (lambda (n) (symbol 'a n)) + (iota (procedure-arity-min arity) 1)))) + `(DEFINE-INTEGRABLE (,variable-name ,@names) + (,primitive ,@names))) + `(DEFINE-INTEGRABLE ,variable-name + ,primitive))))))) `(BEGIN ,@(map (lambda (name) (cond ((not (pair? name)) (primitive-definition name (list name))) -- 2.25.1