[plt-scheme] difference between imported definition versus locally defined definitions?

From: Yin-So Chen (yinso.chen at gmail.com)
Date: Mon Apr 23 19:45:25 EDT 2007

Hi all -

What is the difference with respect to imported bindings and local
bindings?  I notice that imported binding cannot be expanded via #%top?

> (define foo (lambda (x) x))
> foo
> (#%top . foo)
#<procedure:foo> ; => expected
> (module foo2 mzscheme
    (define bar (lambda (x) x))
    (provide bar))
> (require foo2)
> bar
> (#%top . bar)
. reference to undefined identifier: bar ; => unexpected...

In syntax a define often gets expanded to (#%top . id) form, so how can I

#'(define local-id imported-id)

Given that the above gets expanded to

#'(define-values (local-id) (#%top . imported-id))



...continuous learning...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20070423/71cb7d39/attachment.html>

Posted on the users mailing list.