[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [plt-scheme] Weird problem

At Thu, 16 May 2002 19:20:54 -0400, Eli Barzilay wrote:
> It looks like something is not working right with units...  This works
> fine for me:
>   (require (prefix compiler: (lib "option.ss" "compiler")))
>   (compiler:verbose #t)
> but this claims that `compiler:verbose' is undefined:
>   (begin (require (prefix compiler: (lib "option.ss" "compiler")))
>          (compiler:verbose #t))

The problem is that MzScheme tries to compile the entire `begin'
expression before acting on any part of it. In particular, it tries to
compile the `compiler:verbose' reference before actually importing

This is a problem with top-level expressions, and I'm not sure how to
fix it. Naturally, you can avoid the problem by putting the `begin'
expression inside a `module'.