try to clarify intent of #:contracts' in defform'

original commit: fbbb30f7b013dc187b20bdecae0e57a845b3b3c8
This commit is contained in:
Matthew Flatt 2011-05-30 08:58:11 -06:00
parent fae7c00658
commit d8f6292e36

View File

@ -639,7 +639,12 @@ determined by the enclosing context).
If a @racket[#:contracts] clause is provided, each
@racket[subform-datum] (typically an identifier that serves as a
meta-variable in @racket[form-datum]) is shown as producing a value
that must satisfy the contract described by @racket[contract-expr-datum].
that must satisfy the contract described by
@racket[contract-expr-datum]. Use @racket[#:contracts] only to
specify constraints on a @emph{value} produced by an expression;
for constraints on the @emph{syntax} of a @racket[subform-datum],
use grammar notation instead, possibly through an
auxiliary grammar specified using @racket[defform/subs].
The typesetting of @racket[form-datum], @racket[subform-datum], and
@racket[contract-expr-datum] preserves the source layout, like