guile-user
[Top][All Lists]
Advanced

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

Re: null source-properties for procedure-source retrieved from frame


From: Andy Wingo
Subject: Re: null source-properties for procedure-source retrieved from frame
Date: Thu, 25 Jan 2007 13:22:56 +0100

Hi Julian,

On Wed, 2007-01-24 at 14:21 -0500, Julian Graham wrote:
> Is
> there some other way I can, for example, find out the line number on
> which a procedure was defined?

I was wondering this myself about a week ago! A couple of hours of
poking through eval.c and debug.c didn't get me anywhere though.

Procedure-source returns the source via unmemoizing guile's memoized
representation, which is always a new tree. So the new tree is not
associated with the original source properties. Furthermore the first
two elements (lambda and the formals list) are reconstructed, they are
not kept from the original source. The best you could do with
source-properties would be the line of the first expression in the body.

I would really like this as well. It would allow automatically-generated
module docs to define procedures in the order that they appear in a
module. Probably needs to be added to procedure-properties rather than
source-properties, though.

Here's hoping someone has a clever patch stashed somewhere :)

Andy.
-- 
http://wingolog.org/





reply via email to

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