unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Yanbin Zhang <yanbinzhang@tamu.edu>
To: "Diogo F. S. Ramos" <diogofsr@gmail.com>
Cc: guile-user@gnu.org
Subject: Re: Loading a module before and after adding a load path
Date: Fri, 18 Jan 2013 11:44:26 -0600	[thread overview]
Message-ID: <CACb7pazHv0SOSyjtK3ZVB0B7HDUrYE2jGgfquZreZ2fhNC2pTg@mail.gmail.com> (raw)
In-Reply-To: <87bocmxzax.fsf@supernova.vialactea>

[-- Attachment #1: Type: text/plain, Size: 1031 bytes --]

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 <diogofsr@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.
>
>

[-- Attachment #2: Type: text/html, Size: 1442 bytes --]

  reply	other threads:[~2013-01-18 17:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-18 15:53 Loading a module before and after adding a load path Diogo F. S. Ramos
2013-01-18 17:44 ` Yanbin Zhang [this message]
2013-01-18 18:17   ` Diogo F. S. Ramos
2013-01-19  3:17 ` Nala Ginrut
2013-01-19  4:15   ` Diogo F. S. Ramos
2013-01-19  4:32     ` Noah Lavine
2013-01-19  6:05       ` Diogo F. S. Ramos
2013-01-20 18:34       ` Andy Wingo
2013-01-21 17:20         ` Ludovic Courtès
2013-01-21 18:12           ` Andy Wingo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACb7pazHv0SOSyjtK3ZVB0B7HDUrYE2jGgfquZreZ2fhNC2pTg@mail.gmail.com \
    --to=yanbinzhang@tamu.edu \
    --cc=diogofsr@gmail.com \
    --cc=guile-user@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).