renaming export in d-lambda

This commit is contained in:
Yuichi Nishiwaki 2014-08-06 02:56:32 +09:00
parent f37c2c25f7
commit b0b60d3f01
1 changed files with 6 additions and 7 deletions

View File

@ -1,11 +1,10 @@
(define-library (picrin experimental lambda) (define-library (picrin experimental lambda)
(import (rename (scheme base) (import (scheme base)
(lambda lambda%))
(picrin macro)) (picrin macro))
(define-syntax bind (define-syntax bind
(ir-macro-transformer (ir-macro-transformer
(lambda% (form inject compare) (lambda (form inject compare)
(let ((formal (car (cdr form))) (let ((formal (car (cdr form)))
(value (car (cdr (cdr form)))) (value (car (cdr (cdr form))))
(body (cdr (cdr (cdr form))))) (body (cdr (cdr (cdr form)))))
@ -27,11 +26,11 @@
,@body) ,@body)
(error "match failure" ,value ',formal)))))))) (error "match failure" ,value ',formal))))))))
(define-syntax lambda (define-syntax destructuring-lambda
(ir-macro-transformer (ir-macro-transformer
(lambda% (form inject compare) (lambda (form inject compare)
(let ((args (car (cdr form))) (let ((args (car (cdr form)))
(body (cdr (cdr form)))) (body (cdr (cdr form))))
`(lambda% formal# (bind ,args formal# ,@body)))))) `(lambda formal# (bind ,args formal# ,@body))))))
(export lambda)) (export (rename destructuring-lambda lambda)))