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
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.
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
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.
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
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
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