[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Stupid module and pregexp questions

From: Andreas Rottmann
Subject: Re: Stupid module and pregexp questions
Date: Thu, 24 Apr 2003 15:36:06 +0200
User-agent: Gnus/5.090018 (Oort Gnus v0.18) Emacs/21.2 (gnu/linux)

MJ Ray <address@hidden> writes:

> On 2003-04-24 13:52:18 +0100 Andreas Rottmann <address@hidden>
> wrote:
>>> Can (use-modules ...) take a file from the current directory?
>> IIRC, yes, if %load-path is set accordingly.
> Please can you give me an example?  I can only make it take from
> subdirectories.
I just tried it out:

(define-module (simple-math))
(define gcd (lambda (a b)
              (if (= a b)
                  (if (> a b)
                      (gcd (- a b) b)
                      (gcd a (- b a))))))

~% ls *.scm
~% guile
guile> %load-path
("/home/andy/share/guile/site" "/usr/local/share/guile/site" 
"/usr/local/share/guile/1.7" "/usr/local/share/guile" ".")
guile> (gcd 21 6)

The same worked also with guile 1.6. Note the trailing "." in %load-path.

Andreas Rottmann         | address@hidden      | address@hidden | address@hidden | GnuPG Key:
Fingerprint              | DFB4 4EB4 78A4 5EEE 6219  F228 F92F CFC5 01FD 5B62

Packages should build-depend on what they should build-depend.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]