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]

modules from modules?


Hello,

I'm probably being a dunderhead, but this has me mystified.  I'm
trying to use a module within another module and it's not working.  Is
the behavior below my bug or a guile bug?  

Thanks for any clues,

Clark

Here's the files and directories:

./
main.scm
./mods/
   mod1.scm
   mod2.scm

main.scm is
(use-modules (mods mod1))

mod1.scm is
(define-module (mods mod1) :use-module (mods mod2))

mod2.scm is
(define-module (mods mod2))

My GUILE_LOAD_PATH variable is not set.

Everything works when: 

> /usr/local/bin/guile
guile> (use-modules (mods mod2))
guile> (use-modules (mods mod1))
guile> (load "main.scm")

However I get:

> /usr/local/bin/guile
guile> (load "main.scm")
ERROR: In procedure open-file:
ERROR: No such file or directory: "./mods/./mods/mod2.scm"
ABORT: (system-error)

As a further data point.  If I move ./mods/ to
/usr/local/share/guile/site/mods:

> /usr/local/bin/guile
guile> (load "main.scm")