[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: JACAL, scm
From: |
Dirk Herrmann |
Subject: |
Re: JACAL, scm |
Date: |
Wed, 21 Nov 2001 22:57:32 +0100 (MET) |
On Thu, 18 Oct 2001, Dirk Herrmann wrote:
> On 18 Oct 2001, Neil Jerram wrote:
>
> > >>>>> "Aubrey" == Aubrey Jaffer <address@hidden> writes:
> >
> > guile> (let ((f -)) (let f ((n (f 1))) n)) ==> 1
> >
> > Aubrey> But Allegro Petrofsky, Radey, and I think it should return
> > Aubrey> -1.
> >
> > The error here is that Guile transforms
> >
> > (let name ((var init) ...) body ...)
> >
> > to
> >
> > (letrec ((name (lambda (var ...) body ...)))
> > (name init ...))
> >
> > This is wrong, because the init's are evaluated inside the environment
> > that includes a binding for name. It should instead be
> >
> > ((letrec ((name (lambda (var ...) body ...))) name) init ...)
> >
> > Now we just need to translate that into code :-) Anyone?
>
> I will do it - no big deal (I hope). But, I won't have time to do it
> before next week. What about adding this code as a test case to the test
> suite? Until it is fixed, it can be tagged as expected to fail.
Done. I also took the freedom to add Aubrey's example as a test case.
Thanks to all of you for pointing out the problem and for suggesting a
solution.
Best regards
Dirk Herrmann
- Re: JACAL, scm, Marius Vollmer, 2001/11/03
- Re: JACAL, scm,
Dirk Herrmann <=