From 783443f9d74b0d24b5d4c471255d705219adf8ce Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Sat, 19 Dec 2015 18:35:32 -0600 Subject: [PATCH] update the docs for ->i (should have been in commit 506c9be0cdf) --- .../scribblings/reference/contracts.scrbl | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/pkgs/racket-doc/scribblings/reference/contracts.scrbl b/pkgs/racket-doc/scribblings/reference/contracts.scrbl index d821401051..b1ff992a28 100644 --- a/pkgs/racket-doc/scribblings/reference/contracts.scrbl +++ b/pkgs/racket-doc/scribblings/reference/contracts.scrbl @@ -1094,18 +1094,21 @@ symbols, and that return a symbol. } @defform*/subs[#:literals (any values) -[(->i (mandatory-dependent-dom ...) +[(->i maybe-chaperone + (mandatory-dependent-dom ...) dependent-rest pre-condition dependent-range post-condition) - (->i (mandatory-dependent-dom ...) + (->i maybe-chaperone + (mandatory-dependent-dom ...) (optional-dependent-dom ...) dependent-rest pre-condition dependent-range post-condition)] -([mandatory-dependent-dom id+ctc +([maybe-chaperone #:chaperone (code:line)] + [mandatory-dependent-dom id+ctc (code:line keyword id+ctc)] [optional-dependent-dom id+ctc (code:line keyword id+ctc)] @@ -1140,6 +1143,12 @@ combinator in that each argument and result is named and these names can be used in the subcontracts and in the pre-/post-condition clauses. In other words, @racket[->i] expresses dependencies among arguments and results. +The optional first keyword argument to @racket[->i] indicates if the result +contract will be a chaperone. If it is @racket[#:chaperone], all of the contract for the arguments +and results must be chaperone contracts and the result of @racket[->i] will be +a chaperone contract. If it is not present, then the result +contract will not be a chaperone contract. + The first sub-form of a @racket[->i] contract covers the mandatory and the second sub-form covers the optional arguments. Following that is an optional rest-args contract, and an optional pre-condition. The pre-condition is