unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: "Pach Roman (DGS-EC/ESG3)" <Roman.Pach@de.bosch.com>
To: <guile-devel@gnu.org>
Subject: define-syntax
Date: Tue, 9 Dec 2008 17:51:58 +0100	[thread overview]
Message-ID: <3F715C67433E594B88B5ABEBBC6EE49F03E16E84@fe-mail47.de.bosch.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 779 bytes --]

I've performed following two short tests.

test 1:
-------

(use-syntax (ice-9 syncase))

(define-syntax my-macro-1
  (syntax-rules ()
    ((_ par1 par2 par3)
     (begin
	   (string-concatenate (list par1 par2 par3))
	   ))))

(define (dummy)
  (my-macro-1 "a" "b" "c"))

(format #t "dummy => ~s\n" (procedure-source dummy))

result:
dummy => (lambda () (string-concatenate (list "a" "b" "c")))

test 2:
-------
(define-macro (my-macro-2 par1 par2 par3)
  (string-concatenate (list par1 par2 par3)))

(define (dummy)
  (my-macro-2 "a" "b" "c")
  )
(dummy)
(format #t "dummy => ~s\n" (procedure-source dummy))

result:
dummy => (lambda () "abc")


It seems to me the define-syntax is broken in version "1.8.2"
or I've done something wrong.

[-- Attachment #2: Type: text/html, Size: 3011 bytes --]

             reply	other threads:[~2008-12-09 16:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-09 16:51 Pach Roman (DGS-EC/ESG3) [this message]
2008-12-09 20:20 ` define-syntax Neil Jerram
2008-12-09 20:52   ` AW: define-syntax Pach Roman (DGS-EC/ESG3)
2008-12-09 21:17     ` define-syntax Neil Jerram
2008-12-09 22:28     ` AW: define-syntax Clinton Ebadi
  -- strict thread matches above, loose matches on Subject: below --
2010-06-15 20:48 define-syntax Ludovic Courtès
2010-06-15 22:06 ` define-syntax Andy Wingo
2010-06-15 22:38   ` define-syntax Ludovic Courtès
2010-06-16  7:35 ` define-syntax Marco Maggi
2010-06-18  8:39   ` define-syntax Andy Wingo
2010-06-18 14:41     ` define-syntax Marco Maggi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3F715C67433E594B88B5ABEBBC6EE49F03E16E84@fe-mail47.de.bosch.com \
    --to=roman.pach@de.bosch.com \
    --cc=guile-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).