From: Per Bothner <per@bothner.com>
To: kawa@sourceware.org
Subject: Re: duplicate version reference - was #<syntax (scheme base) in #61>
Date: Fri, 3 Nov 2023 10:35:04 -0700 [thread overview]
Message-ID: <c4a14b4c-7744-4f7a-b031-8d515a6704dd@bothner.com> (raw)
In-Reply-To: <CADEOadc5ucsdvu7C8XHTyvaAWsdqjfoWt2bF52APHMLhCO40+w@mail.gmail.com>
On 11/3/23 10:25, Damien Mattei via Kawa wrote:
> but if i put the statement in a macro, it no more works:
> kawa -Dkawa.import.path="."
> #|kawa:1|# (define-syntax define-overload-existing-operator
> #|.....2|#
> #|.....3|# (syntax-rules ()
> #|.....4|#
> #|.....5|# ((_ proc) (import (rename (scheme base) (proc orig-proc))))))
> #|kawa:6|# (define-overload-existing-operator +)
> /dev/tty:6:1: duplicate version reference - was #<syntax (scheme base) in #61>
> /dev/tty:6:1: unknown library (#<syntax#3 rename in #61>)
To start with, orig-proc is undefined. proc and orig-proc are completely unrelated identifiers.
Generating a new identifier orig-proc based on an existing identifier proc
is possible (using syntax->datum and datum->syntax) but it's tricky.
Using import in a macro expansion may have some issues or bugs
I haven't really thought about, at least not in a long time.
--
--Per Bothner
per@bothner.com http://per.bothner.com/
next prev parent reply other threads:[~2023-11-03 17:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-03 17:25 Damien Mattei
2023-11-03 17:35 ` Per Bothner [this message]
2023-11-03 17:57 ` Damien Mattei
2023-11-03 18:29 ` Per Bothner
2023-11-03 23:48 ` Damien Mattei
2023-11-04 14:56 ` Damien Mattei
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c4a14b4c-7744-4f7a-b031-8d515a6704dd@bothner.com \
--to=per@bothner.com \
--cc=kawa@sourceware.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).