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] underscore is not a pattern variable and can appear any number of times Date: Mon, 21 Jun 2010 09:35:41 +0200 Message-ID: <87hbkw4z3m.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 1277105728 16100 80.91.229.12 (21 Jun 2010 07:35:28 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 21 Jun 2010 07:35:28 +0000 (UTC) To: bug-guile@gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Mon Jun 21 09:35:26 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 1OQbXO-0008Bq-Pb for guile-bugs@m.gmane.org; Mon, 21 Jun 2010 09:35:23 +0200 Original-Received: from localhost ([127.0.0.1]:50173 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OQbXN-0007XA-Hk for guile-bugs@m.gmane.org; Mon, 21 Jun 2010 03:35:21 -0400 Original-Received: from [140.186.70.92] (port=39677 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OQbXD-0007X4-M9 for bug-guile@gnu.org; Mon, 21 Jun 2010 03:35:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OQbXC-0002hO-Di for bug-guile@gnu.org; Mon, 21 Jun 2010 03:35:11 -0400 Original-Received: from relay-pt2.poste.it ([62.241.5.253]:50782) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OQbXC-0002hC-8f for bug-guile@gnu.org; Mon, 21 Jun 2010 03:35:10 -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 4C1E9DF20000E604 for bug-guile@gnu.org; Mon, 21 Jun 2010 09:35:07 +0200 Original-Sender: marco.maggi-ipsu@poste.it X-Loop: marco@maggi.it X-Mailer: GNU Emacs Original-Lines: 62 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:4689 Archived-At: The following R6RS program: (import (rnrs)) (define-syntax ciao (lambda (stx) (syntax-case stx () ((_ _) "ciao\n")))) (display (ciao 1)) fails with: ;;; note: autocompilation is enabled, set GUILE_AUTO_COMPILE=0 ;;; or pass the --no-autocompile argument to disable. ;;; compiling proof.sps ;;; WARNING: compilation of proof.sps failed: ;;; key syntax-error, throw_args (macroexpand "~a: ~a in ~a" (syntax-case "duplicate pattern variable" (_ _)) #f) Backtrace: In ice-9/boot-9.scm: 170: 17 [catch #t # ...] In unknown file: ?: 16 [catch-closure] In ice-9/boot-9.scm: 62: 15 [call-with-prompt prompt0 ...] In ice-9/eval.scm: 389: 14 [eval # #] In ice-9/boot-9.scm: 1858: 13 [save-module-excursion #] 1149: 12 [load "proof.sps" #f] 1051: 11 [%start-stack load-stack ...] 1056: 10 [#] In unknown file: ?: 9 [primitive-load "proof.sps"] In ice-9/eval.scm: 458: 8 [# (define-syntax ciao #)] In ice-9/psyntax.scm: 1195: 7 [chi-top (define-syntax ciao (lambda # #)) () ((top)) ...] 1572: 6 [chi-simple-lambda (lambda (stx) (syntax-case stx () ...)) () ...] 1462: 5 [parse (((# #) . #(syntax-object # # #))) () () () () () ()] In unknown file: ?: 4 [map # ((# . #))] In ice-9/psyntax.scm: 2410: 3 [# # # () ...] In unknown file: ?: 2 [scm-error syntax-error macroexpand ...] In ice-9/boot-9.scm: 115: 1 [# syntax-error ...] In unknown file: ?: 0 [catch-closure syntax-error macroexpand ...] ERROR: In procedure macroexpand: ERROR: syntax-case: duplicate pattern variable in (_ _) on a i686-pc-linux-gnu when using commit 8d10ccae79ff46f0ebea92ba36acfaebafba8d86. The underscore is an auxiliary syntax, not a pattern variable; so it can appear any number of times in a patter and match any subform of the input form. -- Marco Maggi