chicken-janitors
[Top][All Lists]
Advanced

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

[Chicken-janitors] Re: #398: Nested let-syntax failure to strip renamed


From: Chicken Trac
Subject: [Chicken-janitors] Re: #398: Nested let-syntax failure to strip renamed identifiers
Date: Sun, 26 Sep 2010 14:19:30 -0000

#398: Nested let-syntax failure to strip renamed identifiers
-----------------------+----------------------------------------------------
  Reporter:  sjamaan   |       Owner:                               
      Type:  defect    |      Status:  new                          
  Priority:  minor     |   Milestone:  4.7.0                        
 Component:  expander  |     Version:  4.6.x                        
Resolution:            |    Keywords:  expander, renamed identifiers
-----------------------+----------------------------------------------------

Comment(by sjamaan):

 The correct er-macro:

 {{{
 (let ((a 1))
   (letrec-syntax
       ((foo (er-macro-transformer
              (lambda (x r c)
                `(,(r 'bar) ,(r 'a) ,(cadr x)))))
        (bar (er-macro-transformer
              (lambda (x r c)
                (let ((c (cadr x))
                      (d (caddr x)))
                 `(,(r 'cons) ,(cadr x)
                   (,(r 'let) ((,c 3))
                    (,(r 'list) ,d ,c ',c))))))))
     (let ((a 2))
       (foo a))))
 }}}

 This returns {{{(1 2 3 a186)}}} (still wrong, of course)

 I have a feeling that the ir-macro returning the wrong result {{{(1 1 3
 a85)}}} is due to the same error. Not 100% sure yet.

-- 
Ticket URL: <http://bugs.call-cc.org/ticket/398#comment:7>
Chicken Scheme <http://www.call-with-current-continuation.org/>
Chicken Scheme is a compiler for the Scheme programming language.

reply via email to

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