From cd1ee2ce21a3f3ad298c04dbdd986b5b4f83cf24 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Mon, 28 Mar 2016 23:42:19 -0700 Subject: [PATCH] improve error msgs in macro --- sugar/private/syntax-utils.rkt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sugar/private/syntax-utils.rkt b/sugar/private/syntax-utils.rkt index 93a31f6..e0464a6 100644 --- a/sugar/private/syntax-utils.rkt +++ b/sugar/private/syntax-utils.rkt @@ -16,8 +16,8 @@ ;; convert calling pattern to form (id contract body-exp) (define-syntax-rule (lambdafy-with-contract stx) (syntax-case stx () - [(_ (id arg (... ...) . rest-arg) contract body (... ...)) - (replace-context #'id #'(id contract (λ (arg (... ...) . rest-arg) body (... ...))))] + [(_ (id arg (... ...) . rest-arg) contract body0 body (... ...)) + (replace-context #'id #'(id contract (λ (arg (... ...) . rest-arg) body0 body (... ...))))] [(_ id contract lambda-exp) (replace-context #'id #'(id contract lambda-exp))])) @@ -25,7 +25,7 @@ ;; convert calling pattern to form (id body-exp) (define-syntax-rule (lambdafy stx) (syntax-case stx () - [(_ (id arg (... ...) . rest-arg) body (... ...)) - (replace-context #'id #'(id (λ (arg (... ...) . rest-arg) body (... ...))))] + [(_ (id arg (... ...) . rest-arg) body0 body (... ...)) + (replace-context #'id #'(id (λ (arg (... ...) . rest-arg) body0 body (... ...))))] [(_ id lambda-exp) (replace-context #'id #'(id lambda-exp))])) \ No newline at end of file