chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] [PATCH] inline-syntax and require-extension-for-sy


From: Peter Bex
Subject: Re: [Chicken-hackers] [PATCH] inline-syntax and require-extension-for-syntax
Date: Sun, 12 May 2013 23:39:27 +0200
User-agent: Mutt/1.4.2.3i

On Sun, May 12, 2013 at 11:17:47PM +0200, Peter Bex wrote:
> I believe a better place for "inline-syntax" is the miscmacros egg.
> There's no technical reason this needs to be added to core, as it's
> purely an extension of what we already have.

Here's a quick implementation of same, which could be put in
miscmacros as-is:

(define-syntax inline-syntax
  (syntax-rules ()
    ((_ expr)
     (let-syntax ((do-it! (er-macro-transformer
                            (lambda (e r c)
                              (expr r c)))))
       (do-it!)))))

This should correctly obey renamed forms, so you can safely
use it inside let-syntax forms.

Cheers,
Peter
-- 
http://www.more-magic.net



reply via email to

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