GNU bug report logs -
#11215
[feature request] better backtraces
Previous Next
To reply to this bug, email your comments to 11215 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guile <at> gnu.org
:
bug#11215
; Package
guile
.
(Tue, 10 Apr 2012 23:14:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Ian Price <ianprice90 <at> googlemail.com>
:
New bug report received and forwarded. Copy sent to
bug-guile <at> gnu.org
.
(Tue, 10 Apr 2012 23:14:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
This is more of a feature request/reminder, than a bug report, but we
don't have a wish list so,....
Tail calls, we all love them, but sometimes they conflict with error
handling, and is often used as the scapegoat for why $language doesn't
support them.
shizzy0 posted the following example and output to the #guile IRC channel
(define (g)
(error "This is broken because ~a" 1))
(g)
;; $ guile -q --debug test-error.scm
;; Backtrace:
;; In ice-9/boot-9.scm:
;; 149: 10 [catch #t #<catch-closure 101303d80> ...]
;; 157: 9 [#<procedure 10129e190 ()>]
;; In unknown file:
;; ?: 8 [catch-closure]
;; In ice-9/boot-9.scm:
;; 63: 7 [call-with-prompt prompt0 ...]
;; In ice-9/eval.scm:
;; 407: 6 [eval # #]
;; In ice-9/boot-9.scm:
;; 2111: 5 [save-module-excursion #<procedure 1012a2100 at ice-9/boot-9.scm:3646:3 ()>]
;; 3653: 4 [#<procedure 1012a2100 at ice-9/boot-9.scm:3646:3 ()>]
;; 1380: 3 [%start-stack load-stack ...]
;; 1385: 2 [#<procedure 10133cc90 ()>]
;; In unknown file:
;; ?: 1 [primitive-load "/Users/shane/School/uvm/CSYS-395-evolutionary-robotics/bullet-2.79/Demos/GuileDemo/test-error.scm"]
;; ?: 0 [scm-error misc-error #f "~A ~S" ("This is broken because ~a" 1) #f]
;;
;; ERROR: In procedure scm-error:
;; ERROR: This is broken because ~a 1
One issue was that he wasn't auto compiling guile code, but there are
two tail calls here. One is the obvious one, in g. And the other, which
surprised me, was with respect to the main program itself. Thus we get
the limited backtrace in an unknown file.
It is possible to provide full backtraces, and source location for error
messages with tail calls, though it's usually more work and requires
overhead, but it's something to think about for the --debug engine at
least.
It would also be nice as a specific counterexample of an implementation
in practice for all the tail call naysayers. :)
--
Ian Price
"Programming is like pinball. The reward for doing it well is
the opportunity to do it again" - from "The Wizardy Compiled"
Information forwarded
to
bug-guile <at> gnu.org
:
bug#11215
; Package
guile
.
(Wed, 04 Jul 2012 19:52:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 11215 <at> debbugs.gnu.org (full text, mbox):
On Wed 11 Apr 2012 01:11, Ian Price <ianprice90 <at> googlemail.com> writes:
> Tail calls, we all love them, but sometimes they conflict with error
> handling, and is often used as the scapegoat for why $language doesn't
> support them.
I agree, fwiw, and probably
http://funcall.blogspot.com/2009/05/you-knew-id-say-something-part-iv.html
is the answer.
Andy
--
http://wingolog.org/
This bug report was last modified 12 years and 346 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.