From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.bugs Subject: Re: peval error Date: Tue, 13 Sep 2011 19:04:36 +0200 Message-ID: <87d3f4s7a3.fsf@gnu.org> References: <874o0kti4m.fsf@pobox.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1315933494 3792 80.91.229.12 (13 Sep 2011 17:04:54 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 13 Sep 2011 17:04:54 +0000 (UTC) Cc: bug-guile To: Andy Wingo Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Tue Sep 13 19:04:50 2011 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1R3WPg-0003Me-H1 for guile-bugs@m.gmane.org; Tue, 13 Sep 2011 19:04:48 +0200 Original-Received: from localhost ([::1]:56112 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R3WPg-0007BT-3Y for guile-bugs@m.gmane.org; Tue, 13 Sep 2011 13:04:48 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:53030) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R3WPd-0007B0-E4 for bug-guile@gnu.org; Tue, 13 Sep 2011 13:04:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R3WPc-0005BV-8V for bug-guile@gnu.org; Tue, 13 Sep 2011 13:04:45 -0400 Original-Received: from solo.fdn.fr ([80.67.169.19]:47850) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R3WPc-0005BH-4K for bug-guile@gnu.org; Tue, 13 Sep 2011 13:04:44 -0400 Original-Received: from pluto (reverse-83.fdn.fr [80.67.176.83]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) (Authenticated sender: lcourtes) by smtp.fdn.fr (Postfix) with ESMTPSA id 07E3C4418D; Tue, 13 Sep 2011 19:04:41 +0200 (CEST) X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 27 Fructidor an 219 de la =?iso-8859-1?Q?R=E9volutio?= =?iso-8859-1?Q?n?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu In-Reply-To: <874o0kti4m.fsf@pobox.com> (Andy Wingo's message of "Sat, 10 Sep 2011 10:35:53 -0700") User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 80.67.169.19 X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:5829 Archived-At: Hi, Andy Wingo skribis: > I'm excited about the partial evaluator. However there is one error > I've found: > > (letrec ((fold (lambda (f x b null? car cdr) > (if (null? x) > b > (f (car x) (fold f (cdr x) b null? car cdr)))))) > (fold * x 1 zero? (lambda (x) x) (lambda (x) (- x 1)))) > > The expansion ends up with the body including lexical-refs to `car' and > `cdr', but they aren't bound in the letrec body. I believe this is now fixed: http://git.sv.gnu.org/cgit/guile.git/commit/?h=3Dstable-2.0&id=3D61237fa4= b96d020e96388cca4fd065ddf43bca60 Thanks! Ludo=E2=80=99.