On 09/13/10 07:52, Felix wrote:

When the toplevel variable passed to `autoload' refers to a module
binding, then you have to import it, otherwise it refers to an
undecorated toplevel variable.

I've just taken a look at how autoload works. Basically:

(autoload foo bar)

expands into something roughly like:

(define bar (lambda args
        (require foo)
        (let ((tmp (global-ref foo#bar)))
             (set! bar tmp)
             (apply tmp args))))

...with some extra stuff in to handle conditions arising and all that.

If there's anything fatally wrong with this approach, please say now, as
it *seems* to be working OK for Ugarit ;-)

ABS

--
Alaric Snell-Pym
http://www.snell-pym.org.uk/alaric/

_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to