This is the mail archive of the guile@cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: corrupt environment?


On Sat, Jun 12, 1999 at 02:46:47PM -0700, thi wrote:
>  > I'm running into a strange problem that I can't figure out, shown by the
>  > following example:
>  > [...]
>  > Any idea what could cause this?
> 
> nested `define' forms are syntactic sugar.  i remember that guile had a
> problem where it did not properly handle the (improper usage) case where
> there were other expressions before the define form in any particular
> lexical scope.  this may be related to what you are seeing.
> 
> as an experiment, move the [stuff before `define'] above after the
> `(define value 42)' (and all other defines) and see what happens.
> actually, better would be to move all defines to the beginning of the
> `let'.

Yes, changing the code around did help.  I guess I didn't read the R5RS
carefully enough.  Thanks for the pointer.

> i believe someone wrote a macro that would allow you to place define
> forms arbitrarily in a scope, not just at the beginning.

I think I'll try to find it, because I do the above all over the code
and don't feel like fixing it all if there's a easier way :-)

> the rest of this post is only peripherally related:
> 
> hmm, does guile@cygnus.com have an archive refbot?  it would be cool to
> have the following text:
> 
> 	(archive-refbot 'search-keywords 
> 			'("define bug" "order"))
> 
> generate a posting by the bot saying "so and so discussed this before,
> here is a URL".  

That would definitely be cool.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]