Add first-order contract checking at definition time.

svn: r13095
This commit is contained in:
Stevie Strickland 2009-01-13 20:52:58 +00:00
parent 4899d91b97
commit 455999eadd

View File

@ -276,6 +276,12 @@ improve method arity mismatch contract violation error messages?
#`(define-syntax #,u
(make-rename-transformer #,(marker u))))
unprotected)
(define-values ()
(begin
#,@(map (λ (p c)
#`(-contract #,(marker c) #,p blame-str 'ignored #,(id->contract-src-info p)))
protected-ids contracts)
(values)))
)))))]
[(_ #:type type blame (arg ...) body0 body ...)
(raise-syntax-error 'with-contract