unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* anonymous lambda file/line
@ 2003-12-19 21:48 Kevin Ryde
  0 siblings, 0 replies; only message in thread
From: Kevin Ryde @ 2003-12-19 21:48 UTC (permalink / raw)


Is the source file and line available for an anonymous procedure when
running under --debug?

I tried, with no luck

	(display (procedure-name (lambda () #f)))
	(newline)
	(display (procedure-properties (lambda () #f)))
	(newline)
	(display (source-properties (procedure-source (lambda () #f))))
	(newline)

When a backtrace or error just says function "#f", it'd be nice to
know where it comes from.  It can be a long way away when throwing
procedures around in lists or whatever.

I was thinking scm_m_lambda could set a name #<lambda foo.scm:123> or
something (which scm_m_define could overwrite if it gets a proper
name).  But if file and line is already hiding somewhere then it'd be
easy enough to just grab that when printing.


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-12-19 21:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-19 21:48 anonymous lambda file/line Kevin Ryde

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