From d362cf94833bc9c06b55249b8d6c39b9ed15aee7 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Mon, 29 Oct 2018 10:50:55 -0700 Subject: [PATCH] fix syntax loc --- sugar/private/syntax-utils.rkt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sugar/private/syntax-utils.rkt b/sugar/private/syntax-utils.rkt index ddd0ace..1e7f749 100644 --- a/sugar/private/syntax-utils.rkt +++ b/sugar/private/syntax-utils.rkt @@ -32,7 +32,7 @@ (values->list (normalize-definition stx (datum->syntax stx 'λ) #t #t))]) ;; because the macro provides the `lambda` below, it takes the local srcloc by default ;; so `syntax/loc` applies the original srcloc (associated with args and body-exp) - #`(NEW-ID CONTRACT (LAMBDA ARGS . NEW-BODY)))] + #`(NEW-ID CONTRACT #,(syntax/loc #'ID-EXP (LAMBDA ARGS . NEW-BODY))))] ;; matches zero or one arguments [_ (raise-syntax-error 'define-macro "not enough arguments")]))