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] |
Christian Lynbech <lynbech@tbit.dk> writes: > >>>>> "thi" == thi <ttn@netcom.com> writes: > > thi> ...the external representation of a module is a list... hmm, after poking around a little, it seems that there are lots of different entities: - the module object returned from `make-module' (a fancy obarray) - external output representation: #<module the-root-module 40180ac8>' - external input representation: `(module that is mine)' - the directory object: `#<directory mine 40167768>' (ext rep) - the interface object: `#<interface readline 4019bcd0>' (ext rep) `define-module' actually creates (or ensures creation of) two modules, one referencing the other via its `%module-public-interface', which is just another module object. this collection is known also as a "directory" and displays using "#<directory...>". directories can be used wherever a module object can be used; i think of them as module pairs (the public in front, the private hiding somewhere). interface objects are also a form of module. > In recent snapshots, the external name for the root module is > `guile-user'. This means that the two expressions: > > (set-current-module the-root-module) > and > (define-module (guile-user)) > > should be the same (I haven't tried this though). well, `the-root-module' is a true module object while `guile-user' is a directory created by `define-module'. guile> the-root-module #<module the-root-module 40180ac8> guile> (current-module) #<directory guile-user 40193f68> guile> (equal? the-root-module (current-module)) #f guile> (define-module (module that is mine)) #<directory mine 40167768> guile> (module-uses the-root-module) (#<interface readline 4019bcd0>) anyway, as someone said, all of this is changing. thi