2014/1/3 Ian Price <ianpric...@googlemail.com>: [...] >> Why isn't the information about the subsequent procedures tracked? Do >> they all get inlined? > > scheme@(guile-user)> ,optimize (define (f) (define (g) (define (h) ((lambda x > (cdr x)))) (h)) (g)) > $2 = (define (f) (cdr '())) > > So, yes. > > Though not relevant to this case, there is also another important factor > in your code, which is that all function calls are tail calls. So even > if you turned off optimisation, you would not see a complete backtrace.
I've checked this with other implementations. Racket, Gambit and Biwa Scheme were equally uninformative. Kawa's backtrace was a nightmare to me, but perhaps someone with more knowledge would be able to infer the actual location of the error. Actually, the only implementation that exposed the exact location was Chicken. It proves that there must be a way to track this information in spite of TCO.