unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* procedure-source inconsistency
@ 2007-08-10 21:01 Eric Eisner
  2007-08-13 18:34 ` Neil Jerram
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Eisner @ 2007-08-10 21:01 UTC (permalink / raw)
  To: bug-guile

Hello,

The built-in 'procedure-source' changes its output in procedures calling 'let' after the procedure in is applied. For example "(define (f) (let ((x 3)) x)) (procedure-source f)" returns '(lambda () (let ((x 3)) x))
But "(begin (f) (procedure-source f))" returns '(lambda () (let* ((x 3)) x))
When we were using procedure-source to store a procedure to file, it was not correctly compared to a newly created identical procedure because a let had been transformed to a let*. In summary, the problem here is that procedure-source is not consistent for the same function when called at different times.

I'm running guile 1.8.1 on Debian Etch, linux 2.6.18.


-Eric



_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: procedure-source inconsistency
  2007-08-10 21:01 procedure-source inconsistency Eric Eisner
@ 2007-08-13 18:34 ` Neil Jerram
  0 siblings, 0 replies; 2+ messages in thread
From: Neil Jerram @ 2007-08-13 18:34 UTC (permalink / raw)
  To: Eric Eisner; +Cc: bug-guile

Eric Eisner <ede@MIT.EDU> writes:

> Hello,
>
> The built-in 'procedure-source' changes its output in procedures calling 'let' after the procedure in is applied. For example "(define (f) (let ((x 3)) x)) (procedure-source f)" returns '(lambda () (let ((x 3)) x))
> But "(begin (f) (procedure-source f))" returns '(lambda () (let* ((x 3)) x))
> When we were using procedure-source to store a procedure to file, it was not correctly compared to a newly created identical procedure because a let had been transformed to a let*. In summary, the problem here is that procedure-source is not consistent for the same function when called at different times.
>
> I'm running guile 1.8.1 on Debian Etch, linux 2.6.18.

Does it help if you do

  (read-enable 'copy)

before loading the code that you are concerned about?


Regards,
        Neil



_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-08-13 18:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-10 21:01 procedure-source inconsistency Eric Eisner
2007-08-13 18:34 ` Neil Jerram

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).