From: Andy Wingo <wingo@pobox.com>
To: Mark H Weaver <mhw@netris.org>
Cc: 13995-done@debbugs.gnu.org
Subject: bug#13995: Problem with macros whose expansions define and use auxiliary macros
Date: Mon, 20 Jun 2016 22:22:00 +0200 [thread overview]
Message-ID: <87vb137grb.fsf@pobox.com> (raw)
In-Reply-To: <87mwu0fgmi.fsf@tines.lan> (Mark H. Weaver's message of "Mon, 18 Mar 2013 19:11:17 -0400")
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 <mhw@netris.org> 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 #<syntax-transformer blah>:
> ERROR: Wrong type to apply: #<syntax-transformer blah>
>
> 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
prev parent reply other threads:[~2016-06-20 20:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-18 23:11 bug#13995: Problem with macros whose expansions define and use auxiliary macros Mark H Weaver
2013-03-20 12:33 ` Andy Wingo
2013-03-20 17:30 ` Mark H Weaver
2016-06-20 20:22 ` Andy Wingo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87vb137grb.fsf@pobox.com \
--to=wingo@pobox.com \
--cc=13995-done@debbugs.gnu.org \
--cc=mhw@netris.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).