chicken-janitors
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-janitors] #1355: define strips hygiene from defined identif


From: Chicken Trac
Subject: Re: [Chicken-janitors] #1355: define strips hygiene from defined identifiers at top-level
Date: Wed, 22 Mar 2017 14:56:13 -0000

#1355: define strips hygiene from defined identifiers at top-level
---------------------------------------+---------------------
            Reporter:  ashinn          |      Owner:
                Type:  defect          |     Status:  new
            Priority:  major           |  Milestone:  someday
           Component:  core libraries  |    Version:  4.12.0
          Resolution:                  |   Keywords:  hygiene
Estimated difficulty:                  |
---------------------------------------+---------------------

Comment (by ashinn):

 The simplest way to reproduce the core bug is:

 {{{
 #;1> (define-syntax deffoo (syntax-rules () ((deffoo val) (define foo
 42))))
 #;2> (deffoo 42)
 #;3> foo
 42
 }}}

 `foo` should have been hygienically renamed, making it effectively
 invisible.  Likely this is by design, and changing it would break existing
 code, but it also makes many types of macros impossible by making it
 impossible to insert temp bindings.

 Note this only affects the top-level: `(let () (deffoo 42) foo)` throws an
 error as expected.

--
Ticket URL: <https://bugs.call-cc.org/ticket/1355#comment:5>
CHICKEN Scheme <https://www.call-cc.org/>
CHICKEN Scheme is a compiler for the Scheme programming language.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]