source locations for 'for' loops in stack traces

svn: r16545
This commit is contained in:
Matthew Flatt 2009-11-04 19:17:31 +00:00
parent f14f541ac4
commit 4edc044cb6

View File

@ -746,8 +746,9 @@
pre-guard
post-guard
[loop-arg ...]) ...) (reverse (syntax->list #'binds))])
#'(let-values (outer-binding ... ...)
#`(let-values (outer-binding ... ...)
outer-check ...
#,(syntax/loc #'orig-stx
(let for-loop ([fold-var fold-init] ...
loop-binding ... ...)
(if (and pos-guard ...)
@ -759,7 +760,7 @@
(for-loop fold-var ... loop-arg ... ...)
(values* fold-var ...)))
(values* fold-var ...)))
(values* fold-var ...)))))]
(values* fold-var ...))))))]
;; Bad body cases:
[(_ [orig-stx . _] fold-bind ())
(raise-syntax-error