Re: [Chicken-users] Defining defmacro using define-syntax

2019-05-14 Thread Juergen Lorenz
Hi all, yes, there is a simple way: (import procedural-macros) and you'll have not only a hygienic (if you want so) define-macro, but other procedural macros and macro creators as well. Cheers Juergen > > The FermaT program transformation system is implemented in WSL > and translated to Scheme

Re: [Chicken-users] Defining defmacro using define-syntax

2019-05-13 Thread Martin Ward
On 13/05/19 19:35, Peter Bex wrote: On Mon, May 13, 2019 at 07:11:40PM +0100, Martin Ward wrote: Chicken scheme does not appear to have defmacro or define-macro but does have define-syntax. Is there a way to define defmacro using define-syntax? This is of course highly discouraged (because

Re: [Chicken-users] Defining defmacro using define-syntax

2019-05-13 Thread Martin Ward
On 13/05/19 19:28, Phil Bewig wrote: From the Standard Prelude at my blog : (define-syntax (define-macro x) (syntax-case x () ((_ (name . args) . body) (syntax (define-macro name (lambda args .

Re: [Chicken-users] Defining defmacro using define-syntax

2019-05-13 Thread Peter Bex
On Mon, May 13, 2019 at 07:11:40PM +0100, Martin Ward wrote: > Chicken scheme does not appear to have defmacro or define-macro > but does have define-syntax. > > Is there a way to define defmacro using define-syntax? This is of course highly discouraged (because defmacro is inherently

Re: [Chicken-users] Defining defmacro using define-syntax

2019-05-13 Thread Phil Bewig
>From the Standard Prelude at my blog : (define-syntax (define-macro x) (syntax-case x () ((_ (name . args) . body) (syntax (define-macro name (lambda args . body ((_ name transformer) (syntax

[Chicken-users] Defining defmacro using define-syntax

2019-05-13 Thread Martin Ward
The FermaT program transformation system is implemented in WSL and translated to Scheme for compiling or interpreting. It was originally developed using SCM scheme which uses defmacro to define macros, eg: (defmacro floop (name . body) `(call-with-current-continuation (lambda (,name)