Subject: bug#11988: eval-case redefinition?

From: Andy Wingo <[email-masked]>
Date: Tue, 05 Mar 2013 17:15:18 +0100

On Thu 19 Jul 2012 15:22, Daniel Llorens <[email-masked]> writes:

> I was cleaning up an old script which goes like this:
>
> (define (eval-case ...)
>   ...
>   val)
>
> (define var (eval-case ...))
>
> This worked from the REPL, but when loading the file with (load
> "script"), var was always #<unspecified>. It turns out that (my)
> eval-case is never executed in this case.

I wonder if this is related to bug 13865.

I tried a script with these contents:

  (define (eval-case val)
    val)

  (define var (eval-case 2))

And I can reproduce the bug with stable-2.0.  `master' seems to have the
right behavior however.  If I had to guess I would think that this was
fixed by the following commit on `master':

    commit 19ef14f9b8b73c04acbbfa6bd993908171bc69f7
    Author: Andy Wingo <[email-masked]>
    Date:   Fri Nov 4 19:37:04 2011 +0100

    defined identifiers scoped in the current module
    
    * ice-9/psyntax.scm (chi-top-sequence): Wrap defined identifiers with
      the current module.  Fixes http://savannah.gnu.org/bugs/?31472.

Or one of the commits around it that has to do with toplevel bindings.
Tough to tell, as that code is significantly different in master as
compared to stable-2.0.

Andy
-- 
http://wingolog.org/