This is the mail archive of the
guile@cygnus.com
mailing list for the Guile project.
Re: Guile and SLIB (and modules in general)
- To: neel@cswv.com (Neel Krishnaswami)
- Subject: Re: Guile and SLIB (and modules in general)
- From: Neel Krishnaswami <neelk@alum.mit.edu>
- Date: Thu, 24 Jun 1999 18:40:03 -0500 (EST)
- Cc: guile@cygnus.com
- References: <3.0.1.32.19990624172829.00d57dc8@emerald.cswv.com>
- Reply-To: neelk@alum.mit.edu
Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se> wrote:
>R5RS-macros are built in.
>
>Try (with a more recent version than 1.3)
>
> (use-syntax (ice-9 syncase))
>
>For slib:
>
> (use-modules (ice-9 slib))
> (require 'primes) ;for example
>
>but this only works if slib is located *in* one of the directories on
>%load-path.
Hmm. I figured out that adding slib to the %load-path was needed, but
things still aren't working right (I've got the slib files in my home
directory until I can get everything working reliably):
guile> %load-path
("/usr/share/guile/site" "/usr/share/guile/1.2" "/usr/share/guile" ".")
guile> (set! %load-path (cons "/home/neelk/code/scheme" %load-path))
guile> (use-modules (ice-9 slib)) ;; seems to work ok
guile> (require 'struct)
ERROR: In expression identity:
ERROR: Unbound variable: identity
ABORT: (misc-error)
The backtrace
Backtrace:
0* [require struct]
1 (or (require:provided? feature) (let (#) (cond #) ...))
2* [provided? struct]
3 (if (symbol? feature) (if (memq feature *features*) #t ...) ...)
...
4 (let ((path #)) (cond (# #) (# #t) ...))
5* [catalog:get struct]
6* (if (not *catalog*) (let (#) (cond #) ...))
7 (let ((slibcat #)) (cond (# # #)) ...)
8* (cond (slibcat (set! *catalog* #)))
9 (set! *catalog* ((slib:eval #) slibcat))
10* ((slib:eval (cadr #)) slibcat)
11* [eval identity]
12* identity
says that it's require.scm in the slib directory that wants identity
defined. Now, this is seriously weird because there's a define for the
identity function in the file /usr/share/guile/1.2/ice-9/slib.scm,
right on line 158.
Is there any reason that slib wouldn't see the definitions in the
init file?
--
Neel Krishnaswami
neelk@alum.mit.edu