From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Pach Roman (DGS-EC/ESG3)" Newsgroups: gmane.lisp.guile.devel Subject: define-syntax Date: Tue, 9 Dec 2008 17:51:58 +0100 Message-ID: <3F715C67433E594B88B5ABEBBC6EE49F03E16E84@fe-mail47.de.bosch.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C95A1E.D79A9E64" X-Trace: ger.gmane.org 1228841813 11238 80.91.229.12 (9 Dec 2008 16:56:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 9 Dec 2008 16:56:53 +0000 (UTC) To: Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Dec 09 17:57:55 2008 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LA5uE-0003ZQ-Mv for guile-devel@m.gmane.org; Tue, 09 Dec 2008 17:57:55 +0100 Original-Received: from localhost ([127.0.0.1]:53433 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LA5t3-0008Tp-Pe for guile-devel@m.gmane.org; Tue, 09 Dec 2008 11:56:41 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LA5rR-0007te-2j for guile-devel@gnu.org; Tue, 09 Dec 2008 11:55:01 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LA5rN-0007sx-S3 for guile-devel@gnu.org; Tue, 09 Dec 2008 11:54:59 -0500 Original-Received: from [199.232.76.173] (port=43770 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LA5rN-0007so-FM for guile-devel@gnu.org; Tue, 09 Dec 2008 11:54:57 -0500 Original-Received: from smtp2-v.fe.bosch.de ([139.15.237.6]:15135) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LA5rM-00008p-SG for guile-devel@gnu.org; Tue, 09 Dec 2008 11:54:57 -0500 Original-Received: from vsmta4.fe.internet.bosch.com (unknown [10.4.98.30]) by imta5.fe.bosch.de (Postfix) with ESMTP id 126473C014 for ; Tue, 9 Dec 2008 17:54:48 +0100 (CET) Original-Received: from si-imc02.de.bosch.com (vsgw4.fe.internet.bosch.com [10.4.98.12]) by vsmta4.fe.internet.bosch.com (Postfix) with ESMTP id E72FCC00C7 for ; Tue, 9 Dec 2008 17:54:47 +0100 (CET) Original-Received: from fe-mail47.de.bosch.com ([10.3.12.108]) by si-imc02.de.bosch.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 9 Dec 2008 17:54:47 +0100 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: define-syntax Thread-Index: AclaHtW1asUp7fnETv+c939hPQs/KA== X-OriginalArrivalTime: 09 Dec 2008 16:54:47.0255 (UTC) FILETIME=[D7C8CE70:01C95A1E] X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:7908 Archived-At: This is a multi-part message in MIME format. ------_=_NextPart_001_01C95A1E.D79A9E64 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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 =3D> ~s\n" (procedure-source dummy)) result: dummy =3D> (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 =3D> ~s\n" (procedure-source dummy)) result: dummy =3D> (lambda () "abc") It seems to me the define-syntax is broken in version "1.8.2" or I've done something wrong. ------_=_NextPart_001_01C95A1E.D79A9E64 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable define-syntax

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 = =3D> ~s\n" (procedure-source dummy))

result:
dummy =3D> (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 =3D> ~s\n" (procedure-source dummy))

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


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

------_=_NextPart_001_01C95A1E.D79A9E64--