From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Rottmann Newsgroups: gmane.lisp.guile.user Subject: Re: Can't define in (if...) after (use-syntax (ice-9 syncase)) ? Date: Fri, 27 Aug 2010 16:04:25 +0200 Message-ID: <87r5hkrw2e.fsf@delenn.lan> References: <20100827124917.GA6222@securactive.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1282917921 10775 80.91.229.12 (27 Aug 2010 14:05:21 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 27 Aug 2010 14:05:21 +0000 (UTC) Cc: guile-user@gnu.org To: Cedric Cellier Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Fri Aug 27 16:05:19 2010 Return-path: Envelope-to: guile-user@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 1OozYV-00070D-4q for guile-user@m.gmane.org; Fri, 27 Aug 2010 16:05:19 +0200 Original-Received: from localhost ([127.0.0.1]:36824 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OozYU-0006Av-Dv for guile-user@m.gmane.org; Fri, 27 Aug 2010 10:05:18 -0400 Original-Received: from [140.186.70.92] (port=55345 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OozXv-0005rZ-0n for guile-user@gnu.org; Fri, 27 Aug 2010 10:04:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OozXp-0003Yv-Js for guile-user@gnu.org; Fri, 27 Aug 2010 10:04:42 -0400 Original-Received: from mailout-de.gmx.net ([213.165.64.22]:41618 helo=mail.gmx.net) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1OozXp-0003YP-76 for guile-user@gnu.org; Fri, 27 Aug 2010 10:04:37 -0400 Original-Received: (qmail invoked by alias); 27 Aug 2010 14:04:34 -0000 Original-Received: from 83-215-154-5.hage.dyn.salzburg-online.at (EHLO nathot.lan) [83.215.154.5] by mail.gmx.net (mp008) with SMTP; 27 Aug 2010 16:04:34 +0200 X-Authenticated: #3102804 X-Provags-ID: V01U2FsdGVkX186zLQH+dM6VOzTeEh7bUYq+NWE2gWfG3+8zz0LUH 3WUnwRhWku5ZNg Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by nathot.lan (Postfix) with ESMTP id A873B3A695; Fri, 27 Aug 2010 16:04:33 +0200 (CEST) Original-Received: from nathot.lan ([127.0.0.1]) by localhost (nathot.lan [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NEGYEKrErPm8; Fri, 27 Aug 2010 16:04:26 +0200 (CEST) Original-Received: from delenn.lan (delenn.lan [192.168.3.11]) by nathot.lan (Postfix) with ESMTP id 4DC7A3A693; Fri, 27 Aug 2010 16:04:26 +0200 (CEST) Original-Received: by delenn.lan (Postfix, from userid 1000) id 1548C74EEA; Fri, 27 Aug 2010 16:04:26 +0200 (CEST) In-Reply-To: <20100827124917.GA6222@securactive.net> (Cedric Cellier's message of "Fri, 27 Aug 2010 14:49:17 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:8105 Archived-At: Cedric Cellier writes: > guile> (use-syntax (ice-9 syncase)) > guile> (if #t (define foo "bar")) > ERROR: invalid context for definition of foo > ABORT: (misc-error) > guile> (version) > $1 = "1.8.7" > > apparently syncase module is altering the if or define behavior somehow ? > I think it's establishing stricter rules for `define' placement. Note that your code is not legal (R5RS) Scheme -- the define is misplaced; it's neither a top-level nor an internal define. Also note that Guile 1.9.x has syntax-case always loaded, and rejects your example code as well: scheme@(guile-user)> (if #t (define foo "bar")) While compiling expression: ERROR: In procedure macroexpand: ERROR: definition in expression context in subform `foo' of `"bar"' What do you want to achieve in your code? Regards, Rotty -- Andreas Rottmann --