From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Julian Graham Newsgroups: gmane.lisp.guile.devel Subject: Re: r6rs standard libraries Date: Mon, 8 Feb 2010 11:02:01 -0500 Message-ID: <2bc5f8211002080802s186a1da1h1bce05ce5f32a8e2@mail.gmail.com> References: <2bc5f8211001240953h4959cb2ar3540be3d464fdaa2@mail.gmail.com> <2bc5f8211001281952v6d6d2e86g28b888f441547d72@mail.gmail.com> <2bc5f8211002060950q599c06aagbcb8ce9dd96e1a64@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1265644937 30801 80.91.229.12 (8 Feb 2010 16:02:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 8 Feb 2010 16:02:17 +0000 (UTC) Cc: guile-devel To: Andy Wingo Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Feb 08 17:02:15 2010 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 1NeW3u-0004bx-NP for guile-devel@m.gmane.org; Mon, 08 Feb 2010 17:02:11 +0100 Original-Received: from localhost ([127.0.0.1]:39798 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NeW3u-0007Xg-8V for guile-devel@m.gmane.org; Mon, 08 Feb 2010 11:02:10 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NeW3r-0007X9-Go for guile-devel@gnu.org; Mon, 08 Feb 2010 11:02:07 -0500 Original-Received: from [199.232.76.173] (port=52037 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NeW3q-0007Wm-Qb for guile-devel@gnu.org; Mon, 08 Feb 2010 11:02:06 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NeW3p-0006aC-S0 for guile-devel@gnu.org; Mon, 08 Feb 2010 11:02:06 -0500 Original-Received: from mail-ew0-f228.google.com ([209.85.219.228]:63783) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NeW3p-0006Yw-19 for guile-devel@gnu.org; Mon, 08 Feb 2010 11:02:05 -0500 Original-Received: by ewy28 with SMTP id 28so2158458ewy.8 for ; Mon, 08 Feb 2010 08:02:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=joHFoy4TC8AMom7iqiHnsrZhSkwYvrCwAWuuQfxbpU0=; b=FVdPMBIYEs3Upo9qYo1B5l1jp3MOYRFXmANtKGzyX7nzigOYRL7wR06ktFO/kSWeel wekVwRd91vsgz8lYtazQN4pNa8HcPG9dCtx2mKmGB5ofeiH98RE39xT1J1HRCIY6jm3R ElYIPJFz86vhI/nFP+AyYGhYrrt0xVXIi+UiQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=l5VLuTa5Mp4yPrwgyDGJ8D9jMvgVAWNljZZAOy1V6z+5hU/jODWqMQw2x11pJOxZjO 0ZUUjDeYAjQ/LHDVkqiPC5L9j+LyPDFcBE89vu8tZlIiS4kTB4SjBrmZ1LFk1SRbpclD +LERz6j9Dtvj9lCtfabWcaZ3UQo2eiDkM8PgI= Original-Received: by 10.213.1.219 with SMTP id 27mr120983ebg.37.1265644921331; Mon, 08 Feb 2010 08:02:01 -0800 (PST) In-Reply-To: X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) 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:9963 Archived-At: Hi Andy, > Will do, and thanks!! No problem! I'm running into some trouble, though, and I could use your (or somebody's) help. I'm a little shaky on the details with regard to the syntax-case expansion process, but I think the issue is that during the expansion of a single top-level expression, the expansion environment is constant. So the following (which is approximately what "native" Guile modules do): (define-module (my-module)) (use-modules ((my-syntax-transformer))) [transformable-syntax] ...will properly expand and compile, since the expansion environment for [transformable-syntax] reflects the updates to the module-uses list made by `use-modules', whereas the following (which is approximately what our R6RS library transformer produces): (begin (define-module (my-module)) (use-modules ((my-syntax-transformer))) [transformable-syntax]) ...won't properly expand macros whose transformers are defined in the `(my-syntax-transformer)' module. Does this sound plausible? I spent most of this past weekend trying to grok this and work around it (via various `eval'-based incantations) without much luck. (The weird part is, I don't recall this happening with my old `(ice-9 r6rs-libraries)' module implementation, but I could be wrong.) Regards, Julian