Hi,

I guess you need to tell GUILE where to find your module before you can
load it. GUILE has some standard places where it will look for modules. If
your module is not there, then you need to add the path so that GUILE can
find it. There are several ways to do this. One is to use
"add-to-load-path" as you did. Another would be setting up some environment
variable so that a certain path is added. You can find more detailed
information in the manual.

Yanbin

On Fri, Jan 18, 2013 at 9:53 AM, Diogo F. S. Ramos <diogo...@gmail.com>wrote:

> I have a module at `/path/to/foo'.
>
> If I open a guile REPL and type:
>
> (add-to-load-path "/path/to/foo")
> (use-modules (foo bar))
>
> everything works. But, if I type:
>
> (use-modules (foo bar))
> (add-to-load-path "/path/to/foo")
> (use-modules (foo bar))
>
> I get the same error I've got by using a module before adding the path:
>
> ERROR: no code for module (foo bar)
>
> How can I load a module if I tried loading it before adding the path?
>
> I'm using Guile 2.0.5.
>
>

Reply via email to