[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-janitors] Re: #445: define-record doesn't respect scope rules
From: |
Chicken Trac |
Subject: |
[Chicken-janitors] Re: #445: define-record doesn't respect scope rules |
Date: |
Sat, 11 Dec 2010 20:42:55 -0000 |
#445: define-record doesn't respect scope rules
----------------------+-----------------------------------------------------
Reporter: mario | Owner: felix
Type: defect | Status: assigned
Priority: major | Milestone: 4.7.0
Component: unknown | Version: 4.6.x
Resolution: | Keywords:
----------------------+-----------------------------------------------------
Comment(by sjamaan):
I'm not sure if I understand that yet. Anyway, here's some more info:
Adding debugging info shows that define-record is expanded in a syntax
environment containing the default bindings. This example shows an empty
syntax environment:
{{{
(define-syntax foo (syntax-rules () ((_ x) (define x 1))))
(let () (foo a))
(print a)
}}}
And hence it throws an error when you run it. However, this gives the
same problem as the original problem:
{{{
(let-syntax ((foo (syntax-rules () ((_ x) (begin (define x 1))))))
(let () (foo a))
(print "inside: " a))
(print "toplevel: " a)
}}}
This prints two lines. The a leaks out here too.
--
Ticket URL: <http://bugs.call-cc.org/ticket/445#comment:5>
Chicken Scheme <http://www.call-with-current-continuation.org/>
Chicken Scheme is a compiler for the Scheme programming language.
- [Chicken-janitors] #445: define-record doesn't respect scope rules, Chicken Trac, 2010/12/09
- [Chicken-janitors] Re: #445: define-record doesn't respect scope rules, Chicken Trac, 2010/12/09
- [Chicken-janitors] Re: #445: define-record doesn't respect scope rules, Chicken Trac, 2010/12/10
- [Chicken-janitors] Re: #445: define-record doesn't respect scope rules, Chicken Trac, 2010/12/10
- [Chicken-janitors] Re: #445: define-record doesn't respect scope rules, Chicken Trac, 2010/12/11
- [Chicken-janitors] Re: #445: define-record doesn't respect scope rules,
Chicken Trac <=
- [Chicken-janitors] Re: #445: define-record doesn't respect scope rules, Chicken Trac, 2010/12/12
- [Chicken-janitors] Re: #445: define-record doesn't respect scope rules, Chicken Trac, 2010/12/16
- [Chicken-janitors] Re: #445: define-record doesn't respect scope rules, Chicken Trac, 2010/12/16
- [Chicken-janitors] Re: #445: define-record doesn't respect scope rules, Chicken Trac, 2010/12/20