From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Noah Lavine Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] Possible Documentation Fix Date: Mon, 31 Jan 2011 14:54:23 -0500 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1296503733 8019 80.91.229.12 (31 Jan 2011 19:55:33 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 31 Jan 2011 19:55:33 +0000 (UTC) Cc: guile-devel@gnu.org To: Andy Wingo Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Jan 31 20:55:28 2011 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PjzqR-0000cp-Qk for guile-devel@m.gmane.org; Mon, 31 Jan 2011 20:55:28 +0100 Original-Received: from localhost ([127.0.0.1]:51701 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PjzqQ-0004Qj-Jh for guile-devel@m.gmane.org; Mon, 31 Jan 2011 14:55:26 -0500 Original-Received: from [140.186.70.92] (port=58539 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pjzpk-00026T-8x for guile-devel@gnu.org; Mon, 31 Jan 2011 14:54:56 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PjzpQ-0006wQ-EG for guile-devel@gnu.org; Mon, 31 Jan 2011 14:54:43 -0500 Original-Received: from mail-gx0-f169.google.com ([209.85.161.169]:48960) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PjzpQ-0006wE-A2 for guile-devel@gnu.org; Mon, 31 Jan 2011 14:54:24 -0500 Original-Received: by gxk5 with SMTP id 5so2743739gxk.0 for ; Mon, 31 Jan 2011 11:54:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=lP7e/34DD2nYRF3PDf7XoauwNk9KwLrEcN8xmiI5HNs=; b=lS8EAQwfTwfnDajoBsX4bA7En9O2L5+DOley7juXxwKGwxb5XUfNt0IgIU6U1nE3d4 wYur0dNIEcjapk00i0OCukJcyZb0Q2htR116DPFa+GE+u6OsZpa/j+fW5Fs+Vy0LoQaj +iOvytBRaFOARYLPwX9DOlnq9+Um1qjYB4h7Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=HmxY7KYS0CepQKTB9fP7XVzAw8Z9FsjOH7/pSKldr22/G80jHplKwGuujhLoy5wymG 9fTmCU3v8HJIjkfNKNqzmVF+3HgYJqk1c6SHQ4T6XmYjh4T6taV3VhwWkcLuTDQ+QoKI U3/MVntCqQC4Bi9shJqPfuyTrudE7KhNR7oCo= Original-Received: by 10.151.111.17 with SMTP id o17mr8492387ybm.294.1296503663575; Mon, 31 Jan 2011 11:54:23 -0800 (PST) Original-Received: by 10.147.136.20 with HTTP; Mon, 31 Jan 2011 11:54:23 -0800 (PST) In-Reply-To: X-Google-Sender-Auth: tW88WQVaQfm9TxOi0pdN8Mk8wxo X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.161.169 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:11454 Archived-At: Hi, > It is correct, but I kinda liked the explicit mention of pattern > variable environments in the original. =A0In syntax expansion, there are > lexical variables, bound in lexical environments, and pattern variables, > bound in syntax-expansion environments. =A0The confusion addressed by tha= t > paragraph was to treat a lexical variable as a pattern variable. ... > Do you still think the discussion of environments is distracting? > Documentation should ulitimately be for users, and if the original text > is not useful at all, by all means we should change it. Not distracting, it's just that I didn't understand it immediately because it didn't explicitly say that I was defining variables in two different sorts of environments - just that there were two different sorts of environments. How about this language? The reason that this one doesn't work is that there are really two environments at work here -- the environment of pattern variables, as bound by @code{syntax-case}, and the environment of lexical variables, as bound by normal Scheme. The outer let form establishes a binding in the environment of lexical variables, but the inner let form is inside a syntax form, where only pattern variables will be substituted. Here we need to introduce a piece of the lexical environment into the pattern variable environment, and we can do so using @code{syntax-case} itself: Noah