unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* define-macro syntax error
@ 2013-02-12  8:15 Akop Pogosian
  2013-02-12  8:20 ` Daniel Hartwig
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Akop Pogosian @ 2013-02-12  8:15 UTC (permalink / raw)
  To: guile-user

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 match any pattern in form (define\
-macro when (lambda (test . branch) (quasiquote (if (unquote test) (begin (unqu\
ote-splicing branch))))))


What's wrong here?



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-02-12 14:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-12  8:15 define-macro syntax error Akop Pogosian
2013-02-12  8:20 ` Daniel Hartwig
2013-02-12  8:42 ` Andy Wingo
2013-02-12  9:26   ` Daniel Hartwig
2013-02-12 10:00     ` Akop Pogosian
2013-02-12 14:07     ` Andy Wingo
2013-02-12 10:11 ` Ian Price

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).