chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] eval bug with (scheme-report-environment 5)


From: Felix
Subject: Re: [Chicken-users] eval bug with (scheme-report-environment 5)
Date: Sun, 04 Apr 2010 23:50:46 +0200 (CEST)

From: Vitaly Magerya <address@hidden>
Subject: [Chicken-users] eval bug with (scheme-report-environment 5)
Date: Mon, 29 Mar 2010 20:15:39 +0300

> Hi, folks. I have a problem with Chicken's eval. Here's a transcript
> of a csi session:
> [...]
> (eval '(case 1 ((1) 0)) (scheme-report-environment 5))

Thanks for the report. The problem was caused by the use of an internal
routine (which isn't really necessary). The fix is in commit 3ae4244
("experimental" branch) in the git repo and below, for your convenience.


cheers,
felix

---------------8<--------------------

diff --git a/expand.scm b/expand.scm
index 774b719..996c45f 100644
--- a/expand.scm
+++ b/expand.scm
@@ -1178,6 +1178,7 @@
          (body (cddr form)) )
       (let ((tmp (r 'tmp))
            (%or (r 'or))
+           (%eqv? (r 'eqv?))
            (%else (r 'else)))
        `(let ((,tmp ,exp))
           ,(let expand ((clauses body) (else? #f))
@@ -1197,8 +1198,7 @@
                           '(##core#begin))
                          (else
                           `(##core#if (,%or ,@(##sys#map
-                                               (lambda (x)
-                                                 `(##sys#eqv? ,tmp ',x))
+                                               (lambda (x) `(,%eqv? ,tmp ',x))
                                                (car clause)))
                                       (##core#begin ,@(cdr clause)) 
                                       ,(expand rclauses #f) ) ) ) ) ) ) ) ) ) 
) ) )




reply via email to

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