let[rec]-syntax should not splice

This commit is contained in:
Alex Shinn 2016-02-22 23:05:12 +09:00
parent 11ad0c3e3d
commit 1f5d816f59
3 changed files with 20 additions and 1 deletions

View file

@ -1,6 +1,8 @@
(define-library (scheme base) (define-library (scheme base)
(import (except (chibi) equal?) (import (rename (except (chibi) equal?)
(let-syntax let-syntax/splicing)
(letrec-syntax letrec-syntax/splicing))
(rename (chibi equiv) (equiv? equal?)) (rename (chibi equiv) (equiv? equal?))
(only (chibi string) string-map string-for-each) (only (chibi string) string-map string-for-each)
(chibi io) (chibi io)

View file

@ -1,4 +1,14 @@
(define-syntax let-syntax
(syntax-rules ()
((let-syntax . x)
(let () (let-syntax/splicing . x)))))
(define-syntax letrec-syntax
(syntax-rules ()
((letrec-syntax . x)
(let () (letrec-syntax/splicing . x)))))
(define-syntax when (define-syntax when
(syntax-rules () (syntax-rules ()
((when test . body) ((when test . body)

View file

@ -492,6 +492,13 @@
(test 'ok (let ((=> #f)) (cond (#t => 'ok)))) (test 'ok (let ((=> #f)) (cond (#t => 'ok))))
(let ()
(define x 1)
(let-syntax ()
(define x 2)
#f)
(test 1 x))
(test-end) (test-end)
(test-begin "5 Program structure") (test-begin "5 Program structure")