Add in nicer version for function definitions.

svn: r11648
This commit is contained in:
Stevie Strickland 2008-09-11 17:36:43 +00:00
parent c1fa0fe0ed
commit 16399b7827

View File

@ -60,6 +60,10 @@ improve method arity mismatch contract violation error messages?
#'(with-contract name
([name contract-expr])
(define name expr))]
[(_ (name arg ...) contract body)
(identifier? (syntax name))
#'(define/contract name contract
(lambda (arg ...) body))]
[(_ name contract-expr expr)
(raise-syntax-error 'define/contract "expected identifier in first position"
define-stx