[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: syntax closures

From: Stefan Israelsson Tampe
Subject: Re: syntax closures
Date: Thu, 24 Jan 2013 00:24:13 +0100


I managed to do what you said, the result is at

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!

On Tue, Jan 22, 2013 at 5:38 PM, Andy Wingo <address@hidden> wrote:
> On Tue 22 Jan 2013 17:19, Stefan Israelsson Tampe <address@hidden> 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
> --

reply via email to

[Prev in Thread] Current Thread [Next in Thread]