Report the correct position for a blamed procedure.
... if the `lambda' of that procedure was the result of expanding a `define': Attach the `define''s source location to the `lambda' expression.
This commit is contained in:
parent
8d39c15b17
commit
f899fdf15d
|
@ -541,9 +541,13 @@
|
||||||
(lambda (fn)
|
(lambda (fn)
|
||||||
(with-syntax ([fn fn]
|
(with-syntax ([fn fn]
|
||||||
[args (cdr (syntax-e #'name-seq))])
|
[args (cdr (syntax-e #'name-seq))])
|
||||||
(quasisyntax/loc stx (define fn #,(stepper-syntax-property
|
(quasisyntax/loc stx
|
||||||
|
(define fn
|
||||||
|
#,(stepper-syntax-property
|
||||||
(stepper-syntax-property
|
(stepper-syntax-property
|
||||||
#`(lambda args expr ...)
|
;; this is so contract blame can report a
|
||||||
|
;; position for the procedure
|
||||||
|
(syntax/loc stx (lambda args expr ...))
|
||||||
'stepper-define-type
|
'stepper-define-type
|
||||||
'shortened-proc-define)
|
'shortened-proc-define)
|
||||||
'stepper-proc-define-name
|
'stepper-proc-define-name
|
||||||
|
|
Loading…
Reference in New Issue
Block a user