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


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Nikita Karetnikov <nikita <at> karetnikov.org>
To: bug-guile <at> gnu.org
Subject: 'letrec' allows to refer to the values of previously bound variables
Date: Tue, 09 Apr 2013 08:41:04 +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."  But it returns 2184 in
Guile 2.0.7.  Either there is a bug in the manual or 'letrec' doesn't
work properly.

[1] https://gnu.org/software/guile/manual/guile.html#Local-Bindings
[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.