Guile can't find Module

216 Views Asked by At

I've just installed guile-lib-0.2.7.tar.gz, and checking post-install, found it at /usr/share/guile/site—which I believe is correct given:

scheme@(guile-user)> (list (%library-dir) (%site-dir) (%global-site-dir) (%package-data-dir))
$1 = ("/usr/share/guile/3.0" "/usr/share/guile/site/3.0" "/usr/share/guile/site" "/usr/share/guile")

That said, the following bread crumbs my problem:

scheme@(guile-user)> (use-modules (guile-lib))
While compiling expression:
no code for module (guile-lib)
scheme@(guile-user)> (use-modules (math))
While compiling expression:
no code for module (math)
scheme@(guile-user)> (add-to-load-path "/usr/share/guile/site")
scheme@(guile-user)> (use-modules (math))
While compiling expression:
no code for module (math)
scheme@(guile-user)> (use-modules (primes.scm))
While compiling expression:
no code for module (primes.scm)

I next tried brute force:

scheme@(guile-user)> (primitive-load-path "/usr/share/guile/site/math/primes.scm")
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-auto-compile argument to disable.
;;; compiling /usr/share/guile/site/math/primes.scm
;;; compiled /home/hsmyers/.cache/guile/ccache/3.0-LE-8-4.2/usr/share/guile/site/math/primes.scm.go
scheme@(math primes)> (prime? 3)
$2 = #t

While it's nice that this approach works, it doesn't seem like the correct way to do things.

Obviously, I'm doing something wrong here, but I'm (as usual) completely clueless as to what is wrong. My question is—what do I need to fix the connection between Guile and Library location?

0

There are 0 best solutions below