From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.devel Subject: Re: enhancement requests ("load-ignoring-cached-go") Date: Thu, 30 Jun 2011 13:38:41 +0200 Message-ID: <87y60ja6rh.fsf@pobox.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1309435451 24247 80.91.229.12 (30 Jun 2011 12:04:11 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 30 Jun 2011 12:04:11 +0000 (UTC) Cc: Mark Harig , guile-devel@gnu.org To: Wolfgang J Moeller Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Jun 30 14:04:06 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 1QcFyY-0004Jw-E9 for guile-devel@m.gmane.org; Thu, 30 Jun 2011 14:04:06 +0200 Original-Received: from localhost ([::1]:56342 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QcFyX-0007Dq-Ia for guile-devel@m.gmane.org; Thu, 30 Jun 2011 08:04:05 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:42435) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QcFxR-0006x6-B5 for guile-devel@gnu.org; Thu, 30 Jun 2011 08:02:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QcFxO-0007Z8-Bw for guile-devel@gnu.org; Thu, 30 Jun 2011 08:02:56 -0400 Original-Received: from a-pb-sasl-sd.pobox.com ([64.74.157.62]:47237 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QcFxN-0007YS-KE for guile-devel@gnu.org; Thu, 30 Jun 2011 08:02:53 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 55A785A1B; Thu, 30 Jun 2011 08:05:06 -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=7Ff7uyvk4IXzxcUtNmwHgq7ysME=; b=Qfphit rKS0ily8w9mfesObcMgdbpFwJKmYjmPqqEqmNH4dBq1fy70/KD1AbxUgrnEgAJAU W0RVbM6SEJmiwLEgCbvFWUwYw5/YjV7BRACi23dTH+JcQsrV/6U3VZDgjuGZiDAX ZsoYjH9nPAru2o3wqDHtA+JLUaq+Yo3uUKKjY= 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=LDVdU8zU6dTM0iR/L4eynRF76LYZcwEG dtOaLXNrQzu/+t4xDqGKXfEhhA7sS7W54s94OgSbVgLwhEJgVH5UDV0QT4KprWs4 WAE43+KbUC3hYFqokTkKaMiPLEV7xSB755ImcIN9NgLriwvaPhR9+9iw3XDcPKeY /mpKtiq/5/Q= Original-Received: from a-pb-sasl-sd.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 3CA335A1A; Thu, 30 Jun 2011 08:05:06 -0400 (EDT) Original-Received: from badger (unknown [90.164.198.39]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id 488DC5A19; Thu, 30 Jun 2011 08:05:05 -0400 (EDT) In-Reply-To: (Wolfgang J. Moeller's message of "Thu, 21 Apr 2011 17:56:44 +0200 (CEST)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) X-Pobox-Relay-ID: 3116AD92-A311-11E0-A586-5875C023C68D-02397024!a-pb-sasl-sd.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 64.74.157.62 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:12604 Archived-At: Hi! On Thu 21 Apr 2011 17:56, Wolfgang J Moeller writes: > btw., in R6RS and this latest "pre-R6RS" 'psyntax', the first argument > to datum->syntax must be an identifier, not an arbitrary syntax > form. Permitting the latter in the old 'psyntax' might have been a > mistake ... I've still got to read up some more, and think of a test. Hum, this might indeed be a bug. Thing is, the answer is not entirely clear. Check this commit log: commit 9846796b6abb6ecbce0d596db32daa7ac5921a2a Author: Andy Wingo Date: Sun Jun 6 13:00:59 2010 +0200 fix module-hygiene corner case by relying more on syntax objects * module/ice-9/psyntax.scm (chi-macro): Instead of assuming that output of a macro should be scoped relative to the module that was current when the macro was defined, allow the module information associated with the syntax object itself to pass through unmolested. Fixes bug 29860. (datum->syntax): Propagate the module of the identifier through to the new syntax object, so that datum->syntax preserves module hygiene in addition to lexical hygiene. (include, include-from-path): Refactor to plumb though the hygiene information from the filename instead of the `include', allowing hygiene from the original caller of include-from-path to propagate through. * module/ice-9/psyntax-pp.scm: Regenerated. * test-suite/tests/syncase.test ("macro-generating macro"): Add test for bug 29860. There were two bugs fixed there, but I'm only interested in the latter, affecting `include-from-path'. The issue was that: (define-syntax include-from-path (syntax-rules () ((_ relname) (include (search-path relname))))) ... (include-from-path "foo") wasn't working, because the included forms were getting scoped relative to the `include' in the macro, not the `include-from-path' in the original invocation. That's because `include' used the #'include identifier for `datum->syntax' on the forms. This change fixed it to use the mark on "foo" instead -- a hack perhaps? Perhaps `include' should take a second argument, an identifier, to use in syntax->datum calls. Anyway, the hack did end up working though, and it would be prohibited by a change to datum->syntax. ISTR that Racket folk had a similar issue about a year ago too. Perhaps it makes more sense in their context, in which (foo) implicitly donotes an instance of the `%app' abstraction. Dunno! I guess I'm going to let this sleeping dog lie around for a while. When & if the time comes to fix it there will be some other code that needs patching too. Thanks for the note, Andy -- http://wingolog.org/