From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Lynn Winebarger Newsgroups: gmane.lisp.guile.devel Subject: syntax-case Date: Mon, 19 Aug 2002 09:57:36 -0500 Sender: guile-devel-admin@gnu.org Message-ID: <02081909573609.19624@locke.free-expression.org> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1029769273 31136 127.0.0.1 (19 Aug 2002 15:01:13 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 19 Aug 2002 15:01:13 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17go1k-00085i-00 for ; Mon, 19 Aug 2002 17:01:08 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17go2k-0004xr-00; Mon, 19 Aug 2002 11:02:10 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17go1v-0004vS-00 for guile-devel@gnu.org; Mon, 19 Aug 2002 11:01:19 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17go1p-0004v3-00 for guile-devel@gnu.org; Mon, 19 Aug 2002 11:01:18 -0400 Original-Received: from rockridge.uits.indiana.edu ([129.79.1.74]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17go1p-0004uk-00 for guile-devel@gnu.org; Mon, 19 Aug 2002 11:01:13 -0400 Original-Received: from logchain.uits.indiana.edu (logchain.uits.indiana.edu [129.79.1.77]) by rockridge.uits.indiana.edu (8.12.1/8.12.1/IUPO) with ESMTP id g7JF1A1g025625 for ; Mon, 19 Aug 2002 10:01:10 -0500 (EST) Original-Received: from locke.free-expression.org (dial-122-6.dial.indiana.edu [156.56.122.6]) by logchain.uits.indiana.edu (8.12.1/8.12.1/IUPO) with SMTP id g7JF1ADH002607 for ; Mon, 19 Aug 2002 10:01:10 -0500 (EST) Original-To: guile-devel@gnu.org X-Mailer: KMail [version 1.2] Errors-To: guile-devel-admin@gnu.org X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.lisp.guile.devel:1119 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:1119 Does anyone else see the following behaviour (from a Petite Chez session) as inconsistent? I was trying to figure out how you can eagerly expand macros without worrying about this sort of thing, and > (define x 5) > (define-syntax foo (lambda (exp) (syntax-case exp () ((_ y) (with-syntax ((z (datum->syntax-object (syntax _) x))) (syntax (quote (z y)))))))) > (foo 8) (5 8) > (let ((x 8)) (let-syntax ((foo (lambda (exp) (syntax-case exp () ((_ y) (with-syntax ((z (datum->syntax-object (syntax _) x))) (syntax (quote (z y))))))))) (foo 'bar))) Error: identifier out of context x. Type (debug) to enter the debugger. > I thought maybe the foo got expanded and _then_ the marked up x was not recognized in the environment, so I tried this: > (define tmp (call/cc (lambda (k) (let-syntax ((foo (lambda (exp) (syntax-case exp () ((_ x ...) (k (syntax _))))))) (foo 'h))))) Error: identifier out of context k. Type (debug) to enter the debugger. So, apparently let-syntax is allowed access only to global variables (and other syntax), though bindings from let(rec) do shadow syntactic keywords. Lynn _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel