From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Matt Wette Newsgroups: gmane.lisp.guile.user Subject: Re: problems with syntax-case and with-syntax Date: Mon, 18 Sep 2017 06:16:51 -0700 Message-ID: <33BDE2DC-09AB-4DBF-AD42-9929CE936F79@gmail.com> References: <87lgm4il3u.fsf@netris.org> <87efrwiief.fsf@netris.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1505740643 4616 195.159.176.226 (18 Sep 2017 13:17:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 18 Sep 2017 13:17:23 +0000 (UTC) Cc: Guile User To: Mark H Weaver Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon Sep 18 15:17:18 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 1dtvvJ-0000wn-7s for guile-user@m.gmane.org; Mon, 18 Sep 2017 15:17:17 +0200 Original-Received: from localhost ([::1]:36593 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dtvvO-0002GD-Qv for guile-user@m.gmane.org; Mon, 18 Sep 2017 09:17:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48670) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dtvv0-0002G6-GX for guile-user@gnu.org; Mon, 18 Sep 2017 09:16:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dtvux-0003dW-7i for guile-user@gnu.org; Mon, 18 Sep 2017 09:16:58 -0400 Original-Received: from mail-pg0-x230.google.com ([2607:f8b0:400e:c05::230]:48616) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dtvux-0003dN-22 for guile-user@gnu.org; Mon, 18 Sep 2017 09:16:55 -0400 Original-Received: by mail-pg0-x230.google.com with SMTP id v23so88966pgc.5 for ; Mon, 18 Sep 2017 06:16:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=UYbyGptTNaVPxRBrmuSowSJcpRz36dXKYMwGUIbBQc0=; b=Z9/bKylZaJ8Vv1GsuC+huUjDkgt0U4GYhfY1EXRwKHFVINTcKWPUfsafgrDctPh/s6 Gw6co3q1ZeLWWOzxiscfiidTm0ej0FjsXshuQLhgzhQn01gw/l0KFfeOns53o/IyXPAB VCFyPzWz+LZNz1TR/bs+jNI7L4aqvT+xZ25qfyb5XqxUx292Ti2QGP+pQh1/zIG8OMJH C/NgRuLwKjvVqqaWcwrRo3dl1UToWTQRz6tMbkoyvPbDm/JCpK4to0KRiqWxRQYVy76h /5U0L0berYYJY8sv9NZC/mEmaUc0ie7Hdfpm6Ekw3iK13N5Ei5aXNP47XWKKvFNHhxUT bUZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=UYbyGptTNaVPxRBrmuSowSJcpRz36dXKYMwGUIbBQc0=; b=cVp8kcybCzYuh1xyBgqg/J836jKJMYYh6Vvzkwl8vFQDvv/7dHyBEPJmWt2Zx0bxtx OL6v9BoUx9PZeDeZmUSeJGY2k4uevdbIYi5+NgrIW9wk771ZWxLlD2igEKmXystlDwqf eSxi3vh+0EAW5r4eZ2M01qsGAH+G/pEs327d8QqKbORLz5fQm33wERskZCPpiUufm4y9 LrwvgUnwsjaNZWurZWVqwfhLnILrdTdZ9FbMmFA+pGt/kM7hUnJkxEEaEkvYYOX7+oo2 a9QIQrl+P3d21RpUxjRKDuPUeDDPukhbrHm+VTTaydq3wbw0gg4HZywmXy7cgXPqgRnD ptyg== X-Gm-Message-State: AHPjjUiTCauHVX6+eiaTDhVcjeH9ApqTm+U3a3qFWmtxkLRf1QmYZv6d xxqQtthTgj+GeQ== X-Google-Smtp-Source: ADKCNb45SqzD2nseeFPgiof1w99kwINE7ydC9mjcBHFQt9WrxTBDr9A5ouktNM/8Q3r8gqQ8TjKLBQ== X-Received: by 10.101.93.132 with SMTP id f4mr32718155pgt.408.1505740613909; Mon, 18 Sep 2017 06:16:53 -0700 (PDT) Original-Received: from nautilus.championbroadband.com (216-165-229-229.championbroadband.com. [216.165.229.229]) by smtp.gmail.com with ESMTPSA id m9sm15041278pgt.49.2017.09.18.06.16.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Sep 2017 06:16:53 -0700 (PDT) In-Reply-To: <87efrwiief.fsf@netris.org> X-Mailer: Apple Mail (2.3273) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::230 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:14165 Archived-At: > On Aug 27, 2017, at 6:35 PM, Mark H Weaver wrote: >=20 > Mark H Weaver writes: >=20 >> The problem is that in Guile 2.2, whenever (define ...) is found = in >> the expanded code, where was introduced by a macro (i.e. not = passed >> as an explicit argument to the macro), Guile will rewrite the = into >> a new name based on the hash of the entire definition form. >=20 > I forgot to mention that only top-level definitions are munged in this > way. >=20 > Also, my parenthetical definition of what it means to be "introduced = by > a macro" lacked precision. To avoid being "introduced by a = macro", > it's not enough for to have been passed an argument to the macro > that generated the definition. If that were the case, you could work > around this by adding an additional layer of macros, where the upper > layer generated and passed it down to the lower layer which would > generate the definition. >=20 > To avoid being considered "introduced by a macro", must > ultimately occur verbatim in the source code outside of any macro > template. I have read through the posts, and the Guile 2.2 ref manual. The = explanations are not quite complete in my mind. If all top-level id's introduced by = macros were munged, then it would break a lot of existing code. See, for = example, the `define-structure' example in "The Scheme Programming Language", 4th = ed. It seems identifiers introduced by datum->syntax are preserved, as long=20= as they are not redefined. Is that correct? In my case, I was redefining by architecture (or convention). I was = generating=20 "wrap-" + in a macro that called a another macro that made = the same=20 definition. Is it bad form to assume an convention like this? Off to do more reading on this: Dybvig's paper on syntax-case and I have = the=20 book too. and R6RS ... Matt