1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-09 13:30:26 +02:00

fix source information lossage for (define (foo) ...) lambda sugar

* module/ice-9/psyntax.scm (source-wrap): Use decorate-source, for
  clarity.
  (syntax-type): When turning the RHS of (define (foo) ...) into a
  lambda, decorate the resulting lambda expression with source
  information, as the RHS later goes to chi-expr, which receives no
  source information. Perhaps that is a bug. In any case, fixes some
  source location lossage, reported by Jao.

* module/ice-9/psyntax-pp.scm: Regenerated.
This commit is contained in:
Andy Wingo 2009-06-20 12:41:11 +02:00
parent 74fdb02e5e
commit 89cb70a0d5
2 changed files with 4250 additions and 4411 deletions

File diff suppressed because it is too large Load diff

View file

@ -941,9 +941,7 @@
(define source-wrap
(lambda (x w s defmod)
(if (and s (pair? x))
(set-source-properties! x s))
(wrap x w defmod)))
(wrap (decorate-source x s) w defmod)))
;;; expanding
@ -1101,7 +1099,9 @@
(valid-bound-ids? (lambda-var-list (syntax args))))
; need lambda here...
(values 'define-form (wrap (syntax name) w mod)
(cons (syntax lambda) (wrap (syntax (args e1 e2 ...)) w mod))
(decorate-source
(cons (syntax lambda) (wrap (syntax (args e1 e2 ...)) w mod))
s)
empty-wrap s mod))
((_ name)
(id? (syntax name))