Add first-order contract checking at definition time.
svn: r13095
This commit is contained in:
parent
4899d91b97
commit
455999eadd
|
@ -276,6 +276,12 @@ improve method arity mismatch contract violation error messages?
|
||||||
#`(define-syntax #,u
|
#`(define-syntax #,u
|
||||||
(make-rename-transformer #,(marker u))))
|
(make-rename-transformer #,(marker u))))
|
||||||
unprotected)
|
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 ...)
|
[(_ #:type type blame (arg ...) body0 body ...)
|
||||||
(raise-syntax-error 'with-contract
|
(raise-syntax-error 'with-contract
|
||||||
|
|
Loading…
Reference in New Issue
Block a user