Fw: [plt-scheme] load-extension and modules?

From: Jens Axel Søgaard (jensaxel at soegaard.net)
Date: Sun Aug 18 06:08:09 EDT 2002

From: "Jens Axel Søgaard" <jensaxel at soegaard.net>
To: <dvanhorn at emba.uvm.edu>
Sent: Sunday, August 18, 2002 12:05 PM
Subject: Re: [plt-scheme] load-extension and modules?


> dvanhorn at emba.uvm.edu wrote:
>
> > (module m
> >   mzscheme
> >   (provide y)
> >   (load-extension "x.so")
> >   (require x-module)
> >   (define (y) (x 1)))
>
> Hm. I tried various stuff with idmodule.
> The problem is that (load-extension.ss "x.so") is not
> evaluated until someone requires m. Thus x
> is not defined at the time of declaration of the
> module.
>
> I have no better solution than:
>
>    (load-extension "x.so")
>    (module m
>      mzscheme
>      (provide y)
>      (require x-module)
>    (define (y) (x 1)))
>
> Perhaps an require-extension form analogous to require
> is an idea to add to the module-system?
>
> Or have we overlooked some other magic?
>
> --
> Jens Axel Søgaard





Posted on the users mailing list.