From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.bugs Subject: bug#13995: Problem with macros whose expansions define and use auxiliary macros Date: Mon, 20 Jun 2016 22:22:00 +0200 Message-ID: <87vb137grb.fsf@pobox.com> References: <87mwu0fgmi.fsf@tines.lan> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1466454206 11367 80.91.229.3 (20 Jun 2016 20:23:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 20 Jun 2016 20:23:26 +0000 (UTC) Cc: 13995-done@debbugs.gnu.org To: Mark H Weaver Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Mon Jun 20 22:23:16 2016 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bF5iz-0003h6-VV for guile-bugs@m.gmane.org; Mon, 20 Jun 2016 22:23:14 +0200 Original-Received: from localhost ([::1]:46278 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bF5iz-000752-1n for guile-bugs@m.gmane.org; Mon, 20 Jun 2016 16:23:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46334) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bF5is-000712-Vh for bug-guile@gnu.org; Mon, 20 Jun 2016 16:23:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bF5io-0005cd-PT for bug-guile@gnu.org; Mon, 20 Jun 2016 16:23:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35738) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bF5io-0005cP-JS for bug-guile@gnu.org; Mon, 20 Jun 2016 16:23:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bF5io-0002Md-GH for bug-guile@gnu.org; Mon, 20 Jun 2016 16:23:02 -0400 Resent-From: Andy Wingo Original-Sender: "Debbugs-submit" Resent-To: bug-guile@gnu.org Resent-Date: Mon, 20 Jun 2016 20:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 13995 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Mail-Followup-To: 13995@debbugs.gnu.org, wingo@pobox.com, mhw@netris.org Original-Received: via spool by 13995-done@debbugs.gnu.org id=D13995.14664541329003 (code D ref 13995); Mon, 20 Jun 2016 20:23:02 +0000 Original-Received: (at 13995-done) by debbugs.gnu.org; 20 Jun 2016 20:22:12 +0000 Original-Received: from localhost ([127.0.0.1]:48073 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bF5hz-0002L9-Tp for submit@debbugs.gnu.org; Mon, 20 Jun 2016 16:22:12 -0400 Original-Received: from pb-sasl1.pobox.com ([64.147.108.66]:63809 helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bF5hy-0002L0-B1 for 13995-done@debbugs.gnu.org; Mon, 20 Jun 2016 16:22:10 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id 08ABD24FC9; Mon, 20 Jun 2016 16:22:09 -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=LJ0eKC8b4qDlMBu+NtwySpvak2s=; b=bLd+AA sDemBFgwPOiuDAnkNgIFrQHsi3R2wC3//wCfMmU0Ul2wSbxTuNPk5PCE9RG7HdUl HtzCIm/USh3+UVqZXQhi7XoXNu2/qaUaeBpbYqi/NyeS63Dc+tpz5rlTezGjsKeD X29cVfoRPS1lGRIhZwkQAyGNjnJxnTFrWPkc8= 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=GKIU031Vtl9LdV3vUMhOsMKujyVlB7sd FJKXzQSebyBF0LNDQIt5KBP8ms5/39FYAcRRj9/rbLivz3NQTn553OX962fvYN/E cWwDBY/FTnOB+xFB//vgFJGGfssbZx81WkVcMlp1A3yPkSqIMGj4Tev+4LUV++rm 1+QT8VbUx+0= Original-Received: from pb-sasl1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id 0112624FC8; Mon, 20 Jun 2016 16:22:09 -0400 (EDT) Original-Received: from clucks (unknown [88.160.190.192]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pb-sasl1.pobox.com (Postfix) with ESMTPSA id 1D1EE24FC7; Mon, 20 Jun 2016 16:22:07 -0400 (EDT) In-Reply-To: <87mwu0fgmi.fsf@tines.lan> (Mark H. Weaver's message of "Mon, 18 Mar 2013 19:11:17 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-Pobox-Relay-ID: A98AB104-3724-11E6-97B7-C1836462E9F6-02397024!pb-sasl1.pobox.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.org gmane.lisp.guile.bugs:8043 Archived-At: So, this example works on master, but for reasons you don't like. We can't fix it on 2.0. If you feel that the solution for macro-introduced identifiers in 2.2 is a release blocker, let's open a thread on -devel again and talk about it, see if we can find some solutions :) In the meantime, closing this one, as there's no 2.0 task and the code "works" in 2.2. Andy On Tue 19 Mar 2013 00:11, Mark H Weaver writes: > Consider the following module: > > (define-module (foo) > #:export (foo)) > > (define-syntax-rule (foo bar) > (begin > (define-syntax-rule (blah x) x) > (define (bar val) (blah val)))) > > and the following session with v2.0.7-204-g1ea3762: > > scheme@(guile-user)> ,use (foo) > scheme@(guile-user)> (foo bar) > scheme@(guile-user)> (bar 5) > ERROR: In procedure #: > ERROR: Wrong type to apply: # > > Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue. > scheme@(guile-user) [1]> > > Note that it works when the same 'foo' macro is entered directly > at a fresh REPL: > > scheme@(guile-user)> > (define-syntax-rule (foo bar) > (begin > (define-syntax-rule (blah x) x) > (define (bar val) (blah val)))) > scheme@(guile-user)> (foo bar) > scheme@(guile-user)> (bar 5) > $1 = 5 > scheme@(guile-user)> > > Mark