From 36d283191e79b8b008fd694a66251f3bf71bb58b Mon Sep 17 00:00:00 2001 From: Joe Marshall Date: Fri, 17 Jun 2011 08:20:58 -0700 Subject: [PATCH] Slight cleanup. --- src/runtime/mit-macros.scm | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/src/runtime/mit-macros.scm b/src/runtime/mit-macros.scm index d68030012..94d9e92d4 100644 --- a/src/runtime/mit-macros.scm +++ b/src/runtime/mit-macros.scm @@ -104,9 +104,10 @@ USA. (lambda (form rename compare) compare ;ignore (if (syntax-match? '(R4RS-BVL FORM + FORM) (cdr form)) - `(,(rename 'CALL-WITH-VALUES) - (,(rename 'LAMBDA) () ,(caddr form)) - (,(rename 'LAMBDA) ,(cadr form) ,@(cdddr form))) + (let ((r-lambda (rename 'LAMBDA))) + `(,(rename 'CALL-WITH-VALUES) + (,r-lambda () ,(caddr form)) + (,r-lambda ,(cadr form) ,@(cdddr form)))) (ill-formed-syntax form))))) (define-syntax :define-record-type @@ -190,19 +191,21 @@ USA. (kernel (make-synthetic-identifier 'KERNEL)) (temps (map (lambda (b) (declare (ignore b)) - (make-synthetic-identifier 'TEMP)) bindings))) - `((,(rename 'LAMBDA) (,kernel) + (make-synthetic-identifier 'TEMP)) bindings)) + (r-lambda (rename 'LAMBDA)) + (r-declare (rename 'DECLARE))) + `((,r-lambda (,kernel) (,kernel ,kernel ,@(map (lambda (binding) (if (pair? (cdr binding)) (cadr binding) (unassigned-expression))) bindings))) - (,(rename 'LAMBDA) (,iter ,@(map car bindings)) - ((,(rename 'LAMBDA) (,name) - (,(rename 'DECLARE) (INTEGRATE-OPERATOR ,name)) + (,r-lambda (,iter ,@(map car bindings)) + ((,r-lambda (,name) + (,r-declare (INTEGRATE-OPERATOR ,name)) ,@body) - (,(rename 'LAMBDA) ,temps - (,(rename 'DECLARE) (INTEGRATE ,@temps)) + (,r-lambda ,temps + (,r-declare (INTEGRATE ,@temps)) (,iter ,iter ,@temps))))))) (else (error "Unrecognized named-let-strategy: " named-let-strategy))))) ((syntax-match? '((* (IDENTIFIER ? EXPRESSION)) + FORM) (cdr form)) @@ -543,7 +546,7 @@ USA. `(,r-begin (,r-declare (INTEGRATE-OPERATOR ,(caadr form))) (,r-define ,(cadr form) - (,r-declare (INTEGRATE ,@(cdadr form))) + (,r-declare (INTEGRATE ,@(cdadr form))) ,@(cddr form)))) (else (ill-formed-syntax form))))))) -- 2.25.1