Re: Using a macro with FOLD alters FOLD procedure!

2005-04-17 Thread Rob Browning
Neil Jerram <[EMAIL PROTECTED]> writes:

> FWIW, I agree.  In 1.7.x I believe we have more of the infrastructure
> in place to get this right - by which I mean to signal an error if a
> macro is passed in this way.  But (having just tried your tests out on
> 1.7.x) it's not doing this just yet.

I haven't considered it carefully yet, but if fold's only supposed to
take a procedure for kons, then why not just add a check-arg-type
procedure? call for kons?

-- 
Rob Browning
rlb @defaultvalue.org and @debian.org; previously @cs.utexas.edu
GPG starting 2002-11-03 = 14DD 432F AE39 534D B592  F9A0 25C8 D377 8C7E 73A4


___
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


Re: problem with srfi-1 when loading from the command line

2005-04-17 Thread Mike Gran
Rick-

Tried it out.  I agree that it doesn't work, just as you described.

I was able to verify that the problem isn't in the order that things
are being defined.  The normal "list-index" gets defined first and then
the srfi-1 "list-index" gets defined later.  

Once the guile prompt comes up, "list-index", "map-in-order",
"for-each" and a bunch of other srfi-1 overwritten functions get
un-overwritten for some reason.  Don't know why.  Something about then
environment of the script being different from the environment of the
guile prompt?

Here's a workaround...  Call the following file with "guile -s tmp.scm"
instead of "guile -l tmp.scm"

---
;; tmp.scm

(use-modules 
(srfi srfi-1)
(oop goops)
(ice-9 rdelim)
(ice-9 pretty-print))

(scm-style-repl)
---

The "scm-style-repl" kicks off a new guile prompt in which the commands
at the prompt have the same environment as the script.  list-index
should then work as expected.

Hope this helps.

--
Mike Gran

--
> 
> 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
> 
> 
> 





__ 
Do you Yahoo!? 
Plan great trips with Yahoo! Travel: Now over 17,000 guides!
http://travel.yahoo.com/p-travelguide


___
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user