From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Hans Aberg Newsgroups: gmane.lisp.guile.devel Subject: Re: summary: lilypond, lambda, and local-eval Date: Fri, 16 Dec 2011 13:13:38 +0100 Message-ID: References: <87r506uodd.fsf@pobox.com> <87pqfpj7e3.fsf@netris.org> <87liqcamrf.fsf@pobox.com> <871us4kdqy.fsf@netris.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1324037701 18964 80.91.229.12 (16 Dec 2011 12:15:01 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 16 Dec 2011 12:15:01 +0000 (UTC) Cc: Andy Wingo , David Kastrup , guile-devel To: Mark H Weaver Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Dec 16 13:14:56 2011 Return-path: Envelope-to: guile-devel@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 1RbWgg-0006Ln-0h for guile-devel@m.gmane.org; Fri, 16 Dec 2011 13:14:54 +0100 Original-Received: from localhost ([::1]:37393 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RbWge-0003Sa-N0 for guile-devel@m.gmane.org; Fri, 16 Dec 2011 07:14:52 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:36938) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RbWgY-0003S9-6z for guile-devel@gnu.org; Fri, 16 Dec 2011 07:14:50 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RbWgT-0000ge-W7 for guile-devel@gnu.org; Fri, 16 Dec 2011 07:14:46 -0500 Original-Received: from smtp-out21.han.skanova.net ([195.67.226.208]:35311) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RbWgT-0000ga-Kd; Fri, 16 Dec 2011 07:14:41 -0500 Original-Received: from [10.0.1.2] (217.210.127.13) by smtp-out21.han.skanova.net (8.5.133) (authenticated as u26619196) id 4EC0B93A00D4BB52; Fri, 16 Dec 2011 13:13:41 +0100 In-Reply-To: <871us4kdqy.fsf@netris.org> X-Mailer: Apple Mail (2.1251.1) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 195.67.226.208 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:13136 Archived-At: On 16 Dec 2011, at 11:33, Mark H Weaver wrote: > Here's what I currently see: >=20 > scheme@(guile-user)> (local-eval #'t (primitive-eval '(let ((t 42)) = (or #f (the-environment))))) > ERROR: In procedure memoize-variable-access!: > ERROR: Unbound variable: t >=20 > This is the correct behavior, no? This is what I get when I play around with the following variation of = David's code in Guile 2.0.3: (define (xxx) (let* ((x 2)) (set! x (+ x 3)) (interaction-environment))) (eval '(begin (set! x (+ x 5)) x) (xxx)) My guess (correct?) is that one wants some variation of = (interaction-environment) that can cause x in the eval expression to = bind to the environment returned by (xxx). Might eval be changed to accommodate for that (without introducing the = name local-eval)? Hans