From: Stefan Israelsson Tampe <stefan.itampe@gmail.com>
To: Andy Wingo <wingo@pobox.com>
Cc: guile-devel <guile-devel@gnu.org>
Subject: Re: syntax closures
Date: Thu, 24 Jan 2013 00:24:13 +0100 [thread overview]
Message-ID: <CAGua6m0quLfGOsEFCz4z5wBS5gyLJVDOkoXFeye4r5n1oVoSmw@mail.gmail.com> (raw)
In-Reply-To: <87d2wxqikf.fsf@pobox.com>
Hi,
I managed to do what you said, the result is at
https://gitorious.org/syntax-closures
I changed it so that it is enough to do
(use-modules (srfi srfi-72))
and hacking along with it using both
#, and #,@
Especially #,@ was difficult but using the ck macro
the appending become more natural. I would expect
the code to be quite expensive computationally though.
On a side note, the quasisyntax expander will severely
transform syntaxes of the form (a b c #,@( ...) a) though
and therefore any macro that assume that this list can have
some form on say 'a b c', will fail because the whole list will
be transformed by quasisyntax. It is possible to introduce splicing
macros in psyntax I think and then the system would be even more
true to the srfi-72. Because I suspect that the srfi-72 spec and
the huge transformation of the list e.g. append macros, does not
mix well.
Anyway it was a fun hack, thanks!
/Stefan
On Tue, Jan 22, 2013 at 5:38 PM, Andy Wingo <wingo@pobox.com> wrote:
> On Tue 22 Jan 2013 17:19, Stefan Israelsson Tampe <stefan.itampe@gmail.com> writes:
>
>>> > (read-hash-extend #\_ syntax-closure-reader)
>>>
>>> Have you tried having your srfi-72 module export a binding for unsyntax?
>>
>> I would like to use that of cause, but does it mix well with other
>> already written code?
>
> It should work in a modular fashion. #,foo reads as (unsyntax foo), and
> the meaning of that depends on the binding of unsyntax that is current.
>
> Andy
> --
> http://wingolog.org/
next prev parent reply other threads:[~2013-01-23 23:24 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-17 20:51 syntax closures Stefan Israelsson Tampe
2013-01-22 12:56 ` Andy Wingo
2013-01-22 16:19 ` Stefan Israelsson Tampe
2013-01-22 16:38 ` Andy Wingo
2013-01-22 19:06 ` Stefan Israelsson Tampe
2013-01-22 20:37 ` Stefan Israelsson Tampe
2013-01-23 23:24 ` Stefan Israelsson Tampe [this message]
2013-01-24 2:08 ` Alex Shinn
2013-01-24 7:11 ` Stefan Israelsson Tampe
2013-01-24 8:45 ` Alex Shinn
2013-02-14 9:42 ` Mikael Djurfeldt
2013-02-14 11:13 ` Stefan Israelsson Tampe
2013-02-15 4:16 ` Mark H Weaver
2013-02-15 9:34 ` Stefan Israelsson Tampe
2013-02-15 10:08 ` Stefan Israelsson Tampe
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=CAGua6m0quLfGOsEFCz4z5wBS5gyLJVDOkoXFeye4r5n1oVoSmw@mail.gmail.com \
--to=stefan.itampe@gmail.com \
--cc=guile-devel@gnu.org \
--cc=wingo@pobox.com \
/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).