unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Cedric Cellier <rixed@happyleptic.org>
To: guile-user@gnu.org
Subject: Re: Can't define in (if...) after (use-syntax (ice-9 syncase)) ?
Date: Wed, 1 Sep 2010 09:12:33 +0200	[thread overview]
Message-ID: <20100901071233.GA27835@securactive.net> (raw)
In-Reply-To: <87r5hkrw2e.fsf@delenn.lan>

-[ 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 ?




  reply	other threads:[~2010-09-01  7:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-27 12:49 Can't define in (if...) after (use-syntax (ice-9 syncase)) ? Cedric Cellier
2010-08-27 14:04 ` Andreas Rottmann
2010-09-01  7:12   ` Cedric Cellier [this message]
2010-09-01 15:23     ` Andy Wingo
2010-09-02  4:39       ` Keith Wright
2010-09-02 18:40         ` Andy Wingo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100901071233.GA27835@securactive.net \
    --to=rixed@happyleptic.org \
    --cc=guile-user@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).