bug-guile
[Top][All Lists]
Advanced

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

bug#38263: Bug in srfi-11


From: Mark H Weaver
Subject: bug#38263: Bug in srfi-11
Date: Sun, 24 Nov 2019 03:44:28 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Hi Tim,

Tim Gesthuizen <address@hidden> wrote:

> Hi,
> I had a look today into the srfi-11 specificiation. It requires that the
> variables are bound to fresh locations so let me rephrase the bug:
>
>> (let ((a 1)
>>       (b (let-values (((a . b) (values 2 3))
>>                       (c (begin (set! a 9) 4)))
>>            (list a b c))))
>>   (cons a b))
>
> Evaluates to `(1 9 (3) (4))` while it should evaluate to
> `(9 2 (3) (4))`.

I agree that this example indicates a bug in Guile's 'let-values'
implementation (which was written by Andy Wingo in August 2009), but I
disagree that it should evaluate to '(9 2 (3) (4)).  I think that your
example should raise an error, because at the point where (set! a 9) is
found, neither of the 'a' variables are in scope.

     Regards,
       Mark





reply via email to

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