From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark H Weaver Newsgroups: gmane.lisp.guile.bugs Subject: bug#13995: Problem with macros whose expansions define and use auxiliary macros Date: Mon, 18 Mar 2013 19:11:17 -0400 Message-ID: <87mwu0fgmi.fsf@tines.lan> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1363648354 16507 80.91.229.3 (18 Mar 2013 23:12:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 18 Mar 2013 23:12:34 +0000 (UTC) To: 13995@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Tue Mar 19 00:12:59 2013 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 1UHjEh-0006Fg-CP for guile-bugs@m.gmane.org; Tue, 19 Mar 2013 00:12:59 +0100 Original-Received: from localhost ([::1]:44227 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHjEK-0004pv-11 for guile-bugs@m.gmane.org; Mon, 18 Mar 2013 19:12:36 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:59372) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHjEF-0004mw-CH for bug-guile@gnu.org; Mon, 18 Mar 2013 19:12:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UHjEA-0008So-Ra for bug-guile@gnu.org; Mon, 18 Mar 2013 19:12:31 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58407) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHjEA-0008Sj-KY for bug-guile@gnu.org; Mon, 18 Mar 2013 19:12:26 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UHjFi-0002UW-FF for bug-guile@gnu.org; Mon, 18 Mar 2013 19:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mark H Weaver Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-guile@gnu.org Resent-Date: Mon, 18 Mar 2013 23:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 13995 X-GNU-PR-Package: guile X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.13636483959506 (code B ref -1); Mon, 18 Mar 2013 23:14:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 18 Mar 2013 23:13:15 +0000 Original-Received: from localhost ([127.0.0.1]:34282 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UHjEx-0002TF-4b for submit@debbugs.gnu.org; Mon, 18 Mar 2013 19:13:15 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:47440) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UHjEv-0002T8-3T for submit@debbugs.gnu.org; Mon, 18 Mar 2013 19:13:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UHjDL-0008CQ-Ej for submit@debbugs.gnu.org; Mon, 18 Mar 2013 19:11:36 -0400 Original-Received: from lists.gnu.org ([208.118.235.17]:53648) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHjDL-0008CG-Ax for submit@debbugs.gnu.org; Mon, 18 Mar 2013 19:11:35 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:58771) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHjDI-0004fl-DN for bug-guile@gnu.org; Mon, 18 Mar 2013 19:11:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UHjDH-0008B4-9p for bug-guile@gnu.org; Mon, 18 Mar 2013 19:11:32 -0400 Original-Received: from world.peace.net ([96.39.62.75]:39332) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHjDH-0008Aq-5O for bug-guile@gnu.org; Mon, 18 Mar 2013 19:11:31 -0400 Original-Received: from 209-6-91-212.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com ([209.6.91.212] helo=tines.lan) by world.peace.net with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1UHjDA-0001n6-Hl; Mon, 18 Mar 2013 19:11:24 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.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-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:6982 Archived-At: Consider the following module: --8<---------------cut here---------------start------------->8--- (define-module (foo) #:export (foo)) (define-syntax-rule (foo bar) (begin (define-syntax-rule (blah x) x) (define (bar val) (blah val)))) --8<---------------cut here---------------end--------------->8--- and the following session with v2.0.7-204-g1ea3762: --8<---------------cut here---------------start------------->8--- 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]> --8<---------------cut here---------------end--------------->8--- Note that it works when the same 'foo' macro is entered directly at a fresh REPL: --8<---------------cut here---------------start------------->8--- 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)> --8<---------------cut here---------------end--------------->8--- Mark