[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Can't define in (if...) after (use-syntax (ice-9 syncase)) ?
From: |
Andreas Rottmann |
Subject: |
Re: Can't define in (if...) after (use-syntax (ice-9 syncase)) ? |
Date: |
Fri, 27 Aug 2010 16:04:25 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
Cedric Cellier <address@hidden> 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 -- <http://rotty.yi.org/>