From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marco Maggi Newsgroups: gmane.lisp.guile.bugs Subject: [r6rs] probably bad syntax expansion Date: Mon, 21 Jun 2010 09:59:56 +0200 Message-ID: <87d3vk4xz7.fsf@rapitore.luna> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1277107193 20724 80.91.229.12 (21 Jun 2010 07:59:53 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 21 Jun 2010 07:59:53 +0000 (UTC) To: bug-guile@gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Mon Jun 21 09:59:51 2010 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OQbv3-0002iN-KX for guile-bugs@m.gmane.org; Mon, 21 Jun 2010 09:59:49 +0200 Original-Received: from localhost ([127.0.0.1]:43968 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OQbv3-0003Jw-19 for guile-bugs@m.gmane.org; Mon, 21 Jun 2010 03:59:49 -0400 Original-Received: from [140.186.70.92] (port=37346 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OQbuf-00038l-1G for bug-guile@gnu.org; Mon, 21 Jun 2010 03:59:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OQbud-0005d0-Qh for bug-guile@gnu.org; Mon, 21 Jun 2010 03:59:24 -0400 Original-Received: from relay-pt2.poste.it ([62.241.5.253]:54660) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OQbud-0005ca-LS for bug-guile@gnu.org; Mon, 21 Jun 2010 03:59:23 -0400 Original-Received: from rapitore.luna (93.147.77.67) by relay-pt2.poste.it (8.5.121.01) (authenticated as marco.maggi-ipsu@poste.it) id 4C1E9DF20000FCD1 for bug-guile@gnu.org; Mon, 21 Jun 2010 09:59:21 +0200 Original-Sender: marco.maggi-ipsu@poste.it X-Loop: marco@maggi.it X-Mailer: GNU Emacs Original-Lines: 64 X-detected-operating-system: by eggs.gnu.org: Solaris 9 X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:4690 Archived-At: The following R6RS program: (import (rnrs)) (define (%general-string-append . args) (let-values (((port getter) (open-string-output-port))) (let loop ((args args)) (if (null? args) (getter) (let ((thing (car args))) (display (if (identifier? (car args)) (identifier->string (car args)) (car args)) port) (loop (cdr args))))))) (define-syntax identifier->string (syntax-rules () ((_ ?identifier) (symbol->string (syntax->datum ?identifier))))) (define (identifier-prefix prefix identifier) (datum->syntax identifier (string->symbol (%general-string-append prefix identifier)))) (identifier-prefix "make-" #'salut) fails with: Backtrace: In ice-9/boot-9.scm: 170: 10 [catch #t # ...] In unknown file: ?: 9 [catch-closure] In ice-9/boot-9.scm: 62: 8 [call-with-prompt prompt0 ...] In ice-9/eval.scm: 389: 7 [eval # #] In ice-9/boot-9.scm: 1858: 6 [save-module-excursion #] 1148: 5 [load "proof.sps" #f] In unknown file: ?: 4 [load-compiled/vm "/home/marco/.cache/guile/ccache/2.0-0.R-LE-4/home/marco/var/tmp/proof.sps.go"] In proof.sps: 23: 3 [identifier-prefix "make-" #(syntax-object salut ((top)) ...)] 12: 2 [%general-string-append "make-" #(syntax-object salut ((top)) ...)] In ice-9/boot-9.scm: 115: 1 [# wrong-type-arg ...] In unknown file: ?: 0 [catch-closure wrong-type-arg "vm-debug-engine" ...] ERROR: In procedure vm-debug-engine: ERROR: Wrong type to apply: #string> on a i686-pc-linux-gnu using commit 8d10ccae79ff46f0ebea92ba36acfaebafba8d86; I get the same error when precompiling and when not precompiling. If I try to reduce the programs to simpler forms (for example simplifying %GENERAL-STRING-APPEND) the error goes away. The program works fine with other R6RS implementations. -- Marco Maggi