GNU bug report logs - #14164
letrec: detect illegal accesses to vars before entering body

Previous Next

Package: guile;

Reported by: Nikita Karetnikov <nikita <at> karetnikov.org>

Date: Tue, 9 Apr 2013 04:43:02 UTC

Severity: wishlist

Full log


View this message in rfc822 format

From: Nikita Karetnikov <nikita <at> karetnikov.org>
To: Mark H Weaver <mhw <at> netris.org>
Cc: 14164 <at> debbugs.gnu.org
Subject: bug#14164: letrec: detect illegal accesses to vars before entering body
Date: Tue, 09 Apr 2013 10:37:38 +0400
[Message part 1 (text/plain, inline)]
>> According to the manual [1], this snippet:
>>
>> (letrec ((a 42)
>>          (b (+ a 10)))
>>   (* a b))
>>
>> should return "Error: unbound variable: a."

> The manual doesn't say anything nearly that specific.

Either you missed it or I misunderstood this sentence.  So if you missed
it, it can be found below 'syntax: letrec* bindings body'.

> In general, if the manual says you "may not" do something, or if the
> R5RS says "it is an error", that means that if you do, the results are
> unspecified.

Are you talking about the result of 'letrec' or 'b'?  Anyway, why does
it return 2184 if the results are unspecified?  Could you elaborate?
[Message part 2 (application/pgp-signature, inline)]

This bug report was last modified 12 years and 66 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.