URL: <http://savannah.gnu.org/bugs/?31234>
Summary: [1.9.12] errors in macroexpand don't give line numbers of source Project: Guile Submitted by: mike121 Submitted on: Sun 03 Oct 2010 06:08:46 PM GMT Category: None Severity: 3 - Normal Item Group: None Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any _______________________________________________________ Details: Hi- Sometimes syntax errors in the macro expander don't give enough info to locate the error. If I create a file that contains (define (func) (let ((val #t)) (if val 0 1 2))) I load the file, Guile reports the syntax error, but, it doesn't give a line number. Obviously I could find the error in this trivial example, but, it longer source code files, it would be nice to know the line number. Below is the non-autocompiled outputs. The autocompiled output is similar. $ GUILE_AUTO_COMPILE=0 guile --debug -s tmp.scm Backtrace: In ice-9/boot-9.scm: 170: 19 [catch #t #<catch-closure 8388710> ...] In unknown file: ?: 18 [catch-closure] In ice-9/boot-9.scm: 62: 17 [call-with-prompt prompt0 ...] In ice-9/eval.scm: 389: 16 [eval # #] In ice-9/boot-9.scm: 1844: 15 [save-module-excursion #<procedure 83c74e0 at ice-9/boot-9.scm:1857:3 ()>] 1153: 14 [load "tmp.scm" #f] 1051: 13 [%start-stack load-stack ...] 1056: 12 [#<procedure 83c7450 ()>] In unknown file: ?: 11 [primitive-load "tmp.scm"] In ice-9/eval.scm: 458: 10 [#<procedure 82a7d60 at ice-9/eval.scm:451:4 (exp)> (define # #)] In ice-9/psyntax.scm: 1147: 9 [chi-top (define (func) (let (#) (if val 0 ...))) () ...] 1504: 8 [chi-simple-lambda (# . #) () (()) ...] 1394: 7 [parse (((#) . #(syntax-object # # #))) () () () () () ()] In unknown file: ?: 6 [map #<procedure 83c7378 at ice-9/psyntax.scm:1393:50 (x)> ((# . #))] In ice-9/psyntax.scm: 2008: 5 [chi-let (let ((val #t)) (if val 0 ...)) (("placeholder" placeholder)) ...] 1394: 4 [parse (((# # #) . #(syntax-object # # #))) () () () () () ()] In unknown file: ?: 3 [map #<procedure 83c72b8 at ice-9/psyntax.scm:1393:50 (x)> ((# . #))] ?: 2 [scm-error syntax-error macroexpand ...] In ice-9/boot-9.scm: 115: 1 [#<procedure 834e460 at ice-9/boot-9.scm:109:6 (thrown-k . args)> syntax-error ...] In unknown file: ?: 0 [catch-closure syntax-error macroexpand ...] ERROR: In procedure macroexpand: ERROR: source expression failed to match any pattern in (if val 0 1 2) _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?31234> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/