This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Guile Module Help


Chris Harris <chrish@lakeside.sea.wa.us> writes:

> Marius --
> 
> I'm trying to pick up scheme/Guile, and, after looking through many info
> pages, web pages, and mailing list archives, I still cannot figure out the
> slightest details of how Guile's module system works.  From one of my
> sources, I was able to tell that "(define-module (guile) :use-module
> (ice-9 slib))" would be useful in importing, say, the slib stuff.  Running
> this, however, seems to do essentially nothing, save return a struct; none
> of the slib stuff (ie the require procedure) is bound anywhere, and the
> environment, as a whole, seems to be about the same as it was before the
> call.
> 
> I saw a reference on one mailing list to that fact that you'd written a
> brief and understandable intro to modules in guile.  If you have that
> lying around, could you please forward it to me?  Otherwise, do you have
> any pointers for getting started with this?
> 
> Thanks.
> 
> -Chris

Chris,

I'm CCing this to the guile mailing list, because I'm afraid I can't
be of any real help myself.

I have only recently written a little text about how dynamic linking
works within Guile, and how to combine it with the module system.
This is probably not what you are asking for.

Soo, could you show us a small Scheme program that does not behave the
way you expect it?  I guess you have trouble with something like this:

    (define-module (my-module)
      :use-module (ice-9 slib))

    (require 'posix-time)
    (display (ctime (current-time)))

Could you try to run this with "guile -s" for starters?