From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Cedric Cellier Newsgroups: gmane.lisp.guile.user Subject: Re: Can't define in (if...) after (use-syntax (ice-9 syncase)) ? Date: Wed, 1 Sep 2010 09:12:33 +0200 Message-ID: <20100901071233.GA27835@securactive.net> References: <20100827124917.GA6222@securactive.net> <87r5hkrw2e.fsf@delenn.lan> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1283326058 17336 80.91.229.12 (1 Sep 2010 07:27:38 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 1 Sep 2010 07:27:38 +0000 (UTC) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Wed Sep 01 09:27:37 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 1OqhjM-0007UV-TY for guile-user@m.gmane.org; Wed, 01 Sep 2010 09:27:37 +0200 Original-Received: from localhost ([127.0.0.1]:40379 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OqhjL-00017B-0j for guile-user@m.gmane.org; Wed, 01 Sep 2010 03:27:35 -0400 Original-Received: from [140.186.70.92] (port=51135 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oqhj7-0000zG-2C for guile-user@gnu.org; Wed, 01 Sep 2010 03:27:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OqhVF-0000I2-SD for guile-user@gnu.org; Wed, 01 Sep 2010 03:13:02 -0400 Original-Received: from smtp5-g21.free.fr ([212.27.42.5]:58566) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OqhVF-0000Ex-98 for guile-user@gnu.org; Wed, 01 Sep 2010 03:13:01 -0400 Original-Received: from apc.happyleptic.org (unknown [82.67.194.89]) by smtp5-g21.free.fr (Postfix) with ESMTP id 5B33CD48056 for ; Wed, 1 Sep 2010 09:12:33 +0200 (CEST) Original-Received: from ccellier.rd.securactive.lan (extranet.securactive.org [82.234.213.170]) by apc.happyleptic.org (Postfix) with ESMTP id 0664933812 for ; Wed, 1 Sep 2010 09:20:54 +0200 (CEST) Original-Received: from rixed by ccellier.rd.securactive.lan with local (Exim 4.71) (envelope-from ) id 1OqhUn-0007Fe-Tk for guile-user@gnu.org; Wed, 01 Sep 2010 09:12:33 +0200 Mail-Followup-To: Cedric Cellier , guile-user@gnu.org Content-Disposition: inline In-Reply-To: <87r5hkrw2e.fsf@delenn.lan> User-Agent: Mutt/1.5.20 (2009-06-14) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:8127 Archived-At: -[ Fri, Aug 27, 2010 at 04:04:25PM +0200, Andreas Rottmann ]---- > > guile> (use-syntax (ice-9 syncase)) > > guile> (if #t (define foo "bar")) > > ERROR: invalid context for definition of foo > > (...) > > > 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. > (...) > What do you want to achieve in your code? I'm doing this : (if (not defined? 'foo) (define foo bar)) without realizing it's not legal scheme. What would be the idiomatic way to write this ?