guile-user
[Top][All Lists]
Advanced

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

problem with srfi-1 when loading from the command line


From: Rick Taube
Subject: problem with srfi-1 when loading from the command line
Date: Sat, 16 Apr 2005 19:26:11 -0500

Im having a problem getting the srfi-1 definition of list-index (which is defined in both guile and srfi-1) to stay in effect when I load my system from the command line using the -l option. im not sure what is going wrong.

I load my program by loading a file called cm.scm, which in turn loads all my system's sources. The first file that it loads is called guile.scm which has the following use-modules in it:

---
(use-modules (srfi srfi-1))
(use-modules (oop goops))
(use-modules (ice-9 rdelim))
(use-modules (ice-9 pretty-print)) ; remove  at some point...
---

Now, if I start up Guile first and THEN load cm.scm from inside it then everything works, as shown in this trace:
THIS WORKS:

galen:/Lisp/cm hkt$ guile
guile> (version)
"1.6.7"
guile> list-index
#<procedure list-index (l k)> ; <- the old list-index
guile> (load "/Lisp/cm/src/cm.scm")
; loading guile.scm
; loading loop.scm
; loading level1.scm
; loading utils.scm
; loading mop.scm
; loading objects.scm
; loading io.scm
; loading scheduler.scm
; loading sco.scm
; loading clm.scm
; loading clm2.scm
; loading midi1.scm
; loading midi2.scm
; loading midi3.scm
; loading data.scm
; loading scales.scm
; loading spectral.scm
; loading patterns.scm
guile> list-index
#<procedure list-index (pred clist1 . rest)>      ; <- the new one
guile> (quit)


NOW, if i load my program from the command line using -l option then it doesnt work, and adding --use-srfi=1 does not help (ive tried with and without the --use-srfi option)

THIS DOES NOT WORK:

galen:/Lisp/cm hkt$ guile --use-srfi="1" -l "/Lisp/cm/src/cm.scm"
; loading guile.scm
; loading loop.scm
; loading level1.scm
; loading utils.scm
; loading mop.scm
; loading objects.scm
; loading io.scm
; loading scheduler.scm
; loading sco.scm
; loading clm.scm
; loading clm2.scm
; loading midi1.scm
; loading midi2.scm
; loading midi3.scm
; loading data.scm
; loading scales.scm
; loading spectral.scm
; loading patterns.scm
guile> list-index
#<procedure list-index (l k)>      ; <- the old version is still set
guile> (quit)


As you can see, the list-index function was not redefined by srfi-1, or maybe it was and something that i dont understand is happeing. Any ideas what is going on? All the other definitions that i am using in srfi-1 are in effect. This happens in guile 1.6.7 and 1.7.1

thanks
--rick





reply via email to

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