From f4dd7e85febef70f759848d35a0f526c9fd9a969 Mon Sep 17 00:00:00 2001 From: Stevie Strickland Date: Thu, 11 Sep 2008 23:11:38 +0000 Subject: [PATCH] We should make sure the error here at least has define/contract in it (even if it's the wrong shape due to leaving the contract out in the call), and we _should_ check to see if we're in a expression context. (Can't remember what reasoning Ryan had about not doing this, but it seems to me that we still need to check, since this expands into defines of various sorts.) svn: r11660 --- collects/scheme/private/contract.ss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/collects/scheme/private/contract.ss b/collects/scheme/private/contract.ss index 7858c19569..ea6b12c0d1 100644 --- a/collects/scheme/private/contract.ss +++ b/collects/scheme/private/contract.ss @@ -77,8 +77,8 @@ improve method arity mismatch contract violation error messages? (define name expr0 expr ...))] [(_ name+arg-list contract body0 body ...) (let-values ([(name lam-expr) - (normalize-definition (datum->syntax #'stx (list* 'define #'name+arg-list #'body0 #'(body ...))) - #'lambda #f #t)]) + (normalize-definition (datum->syntax #'define-stx (list* 'define/contract #'name+arg-list #'body0 #'(body ...))) + #'lambda #t #t)]) #`(define/contract #,name contract #,lam-expr))] [(_ name contract-expr expr) (raise-syntax-error 'define/contract "expected identifier in first position"