From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.user Subject: Re: primitive eval with module => Unbound variable? Date: Mon, 22 May 2017 21:48:13 +0200 Message-ID: <87o9uk3c76.fsf@pobox.com> References: <87ziec4g62.fsf@gnu.org> <8737c3nu9p.fsf@pobox.com> <87shk24vdo.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1495482553 15874 195.159.176.226 (22 May 2017 19:49:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 22 May 2017 19:49:13 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) Cc: guile-user@gnu.org To: Jan Nieuwenhuizen Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon May 22 21:49:06 2017 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dCtKD-0003vK-8V for guile-user@m.gmane.org; Mon, 22 May 2017 21:49:05 +0200 Original-Received: from localhost ([::1]:44611 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dCtKI-0002Oc-E6 for guile-user@m.gmane.org; Mon, 22 May 2017 15:49:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43152) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dCtJa-0002MV-Se for guile-user@gnu.org; Mon, 22 May 2017 15:48:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dCtJX-0005BB-P8 for guile-user@gnu.org; Mon, 22 May 2017 15:48:26 -0400 Original-Received: from pb-sasl1.pobox.com ([64.147.108.66]:61109 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dCtJX-0005B6-Jw; Mon, 22 May 2017 15:48:23 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id EE2D16CD30; Mon, 22 May 2017 15:48:22 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=FDtOWov5YMlj1S7/1BvoWYGjLUs=; b=AUbaNs Rzolo9kReXnDs1U9jo/Z/Ej4wMmVgZr7xA83m1oZNbkFJqyI3r6suwjzK0WiJB/W TaZQ6B1zAGlahACS9Aw25EqmItxV1q+5DFb4I4n4qnK+T3AcxrTCnT1WrCQLEEBN Vsqh9Q7UKVq8sdYpV+qu8MHrxVFLfTUD4lA5c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=WS8vf3f4p4Zr2lHTnbIOyxX9+eb0WZOT KuUSh8/B7RRmpTpF6BkJOcAyKHaCCCd1ojR3wlGD17dioZ2OMP8V+Zrr75Si1CzM vOTl1p3hIgbDFhCo98G4coXgNiYYkYEYvzQLkZRu9KDEumlEWNa548u3Rc/rN/jS QR0v/tTPYn4= Original-Received: from pb-sasl1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id E73846CD2F; Mon, 22 May 2017 15:48:22 -0400 (EDT) Original-Received: from clucks (unknown [81.34.20.186]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pb-sasl1.pobox.com (Postfix) with ESMTPSA id 2C3E56CD2E; Mon, 22 May 2017 15:48:21 -0400 (EDT) In-Reply-To: <87shk24vdo.fsf@gnu.org> (Jan Nieuwenhuizen's message of "Thu, 18 May 2017 06:54:59 +0200") X-Pobox-Relay-ID: 9CBBB426-3F27-11E7-BA58-9BB2D5707B88-02397024!pb-sasl1.pobox.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 64.147.108.66 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:13737 Archived-At: More concretely... you think in your examples that because you see (current-module) in the (foo) module that (current-module) will be (foo). That is a lexical assumption. It's usually what you want. But current-module isn't lexically scoped -- it's dynamically scoped. Its value comes from the continuation that invokes the call, not the environment in which the expression appears. Andy