Oh, let me refrace the previous mail and sebnd it to guuile devel also! ---------- Forwarded message ---------- From: Stefan Israelsson Tampe <stefan.ita...@gmail.com> Date: Sun, Nov 27, 2011 at 4:03 PM Subject: Re: guile-syntax-parse To: Andy Wingo <wi...@pobox.com>
On syntax parse, Syntax parse depends heavally on syntax parameters. I did not find that support in guile so I would probably try to port syntax-parse to guile if there was similar features in guile. Also it looks like syntax-parse is heavally used in racket for macrology and the more complex one will be dounting to port without this feature (think about contracts) So my erffort in the near future might be. 1. find how to implement/use a similar feature as syntax-parameters 2. port syntax-parse 3. port contracts Of cause this is simplistic view of the problem space, but it is a nessesary chain. Anyhow Is there a similar feature in guile that can match syntax-parameters? And can anyone explain the sematics Let me have a try for that! then (with-syntax-parameter ((name expr)) code ...) Assuming an expander with something like (define (expand x) (if (procedure-stx? x) (stx-precedure-call x expand) (if (macro-form? x) (expand (macro-expand x)) (if (atom? x) (atom-expand x) (map expand x)))) then the with-syntax-parameter code could expand to something like (let ((res expr)) (make-stx (lambda (f) (with (name expr) (f res)))) where 'with' works very much like a fluid and where the macro expansion code does an implicit fluid-ref to get to the transformer if the macro is a syntax-parameter. /Stefan On Wed, Nov 23, 2011 at 10:47 PM, Andy Wingo <wi...@pobox.com> wrote: > On Mon 09 May 2011 14:11, Stefan Israelsson Tampe <stefan.ita...@gmail.com> > writes: > > > Hi, check out guile-syntax-parse at > > https://gitorious.org/guile-syntax-parse/guile-syntax-parse > > How is this going? Are you still using it? > > You didn't get any responses, but I'm still curious to see it working. > Syntax-parse sounds like a useful facility. I'm offline at the moment, > but I would be interested in hearing about your experiences with this. > > Cheers, > > Andy > -- > http://wingolog.org/ >