[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
loading a module via an absolute path
From: |
Paul Jarc |
Subject: |
loading a module via an absolute path |
Date: |
Fri, 04 Oct 2002 18:41:36 -0400 |
User-agent: |
Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i686-pc-linux-gnu) |
use-modules is good for avoiding name clashes. However, I'd like to
avoid searching %load-path in some cases, and load a module (not
necessarily in the Guile sense, exactly - just a library) via a
literal path. use-modules can also only be used at the top level,
which isn't always convenient. I think I ought to be able to
duplicate what I like about use-modules with something like this:
(eval '(load "/path/to/foo.scm") new-environment)
But I have some questions:
- The manual says (load) will evaluate the file's contents in the
top-level environment. Is that still true inside eval, or will it
load into the specified environment?
- What's the difference between load and primitive-load?
- Is there a way to load from an already-open port rather than a
filename? Could I just loop with read and eval? Would that handle,
e.g., read-hash-extend properly? I don't see any reason it
wouldn't.
- How do I create a new environment? The documented procedures don't
seem to exist:
guile> (null-environment 5)
<unnamed port>:29:1: In expression (null-environment 5):
<unnamed port>:29:1: Unbound variable: null-environment
ABORT: (unbound-variable)
guile> (scheme-report-environment 5)
<unnamed port>:30:1: In expression (scheme-report-environment 5):
<unnamed port>:30:1: Unbound variable: scheme-report-environment
ABORT: (unbound-variable)
guile> (assv-ref %guile-build-info 'guileversion)
"1.6.0"
(interaction-environment) does what it's supposed to do, but that
isn't what I need.
paul
- loading a module via an absolute path,
Paul Jarc <=
- Re: loading a module via an absolute path, Rob Browning, 2002/10/05
- Re: loading a module via an absolute path, Paul Jarc, 2002/10/07
- Re: loading a module via an absolute path, Paul Jarc, 2002/10/07
- Re: loading a module via an absolute path, Paul Jarc, 2002/10/18
- Re: loading a module via an absolute path, Marius Vollmer, 2002/10/18
- Re: loading a module via an absolute path, Paul Jarc, 2002/10/18
- Re: loading a module via an absolute path, Marius Vollmer, 2002/10/19
- Re: loading a module via an absolute path, Paul Jarc, 2002/10/19
- Re: loading a module via an absolute path, Marius Vollmer, 2002/10/20