Re: define-macro syntax error

2013-02-12 Thread Andy Wingo
On Tue 12 Feb 2013 10:26, Daniel Hartwig writes: > On 12 February 2013 16:42, Andy Wingo wrote: >> On Tue 12 Feb 2013 09:15, Akop Pogosian writes: >> >>> (define-macro when >>> (lambda (test . branch) >>> `(if ,test >>> (begin ,@branch >>> >>> will give an error: >> >> This i

Re: define-macro syntax error

2013-02-12 Thread Ian Price
Akop Pogosian writes: > (define-macro when > (lambda (test . branch) > `(if ,test > (begin ,@branch FWIW, `when' is already available in Guile 2, and define-macro is generally frowned upon. For these ultra-simple cases, prefer define-syntax-rule. -- Ian Price -- shift-reset.

Re: define-macro syntax error

2013-02-12 Thread Akop Pogosian
On Tue, Feb 12, 2013 at 3:26 AM, Daniel Hartwig wrote: > On 12 February 2013 16:42, Andy Wingo wrote: >> On Tue 12 Feb 2013 09:15, Akop Pogosian writes: >> >>> (define-macro when >>> (lambda (test . branch) >>> `(if ,test >>> (begin ,@branch >>> >>> will give an error: >> >> T

Re: define-macro syntax error

2013-02-12 Thread Daniel Hartwig
On 12 February 2013 16:42, Andy Wingo wrote: > On Tue 12 Feb 2013 09:15, Akop Pogosian writes: > >> (define-macro when >> (lambda (test . branch) >> `(if ,test >> (begin ,@branch >> >> will give an error: > > This is a bug. I just fixed it in stable-2.0; thanks for the report.

Re: define-macro syntax error

2013-02-12 Thread Andy Wingo
On Tue 12 Feb 2013 09:15, Akop Pogosian writes: > (define-macro when > (lambda (test . branch) > `(if ,test > (begin ,@branch > > will give an error: This is a bug. I just fixed it in stable-2.0; thanks for the report. In the meantime, you can use: (define-macro (when tes

Re: define-macro syntax error

2013-02-12 Thread Daniel Hartwig
On 12 February 2013 16:15, Akop Pogosian wrote: > I am having problems getting simple define-macro to work in Guile 2. > > For example, this: > > (define-macro when > (lambda (test . branch) > `(if ,test > (begin ,@branch > What's wrong here? > This is not the right syntax. F

define-macro syntax error

2013-02-12 Thread Akop Pogosian
I am having problems getting simple define-macro to work in Guile 2. For example, this: (define-macro when (lambda (test . branch) `(if ,test (begin ,@branch will give an error: While compiling expression: ERROR: Syntax error: unknown file:8:0: source expression failed to mat