From 792dc70ea6b1644f182024405a0529cb0ae7d3e6 Mon Sep 17 00:00:00 2001 From: Stevie Strickland Date: Tue, 17 Feb 2009 18:26:24 +0000 Subject: [PATCH] Add description of what #:freevars/#:freevar does. svn: r13701 --- collects/scribblings/reference/contracts.scrbl | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/collects/scribblings/reference/contracts.scrbl b/collects/scribblings/reference/contracts.scrbl index acfdd3fca9..e220d8ee6d 100644 --- a/collects/scribblings/reference/contracts.scrbl +++ b/collects/scribblings/reference/contracts.scrbl @@ -693,7 +693,12 @@ exported without a contract. The @scheme[blame-id] is used for the positive positions of contracts paired with exported @scheme[id]s. Contracts broken within the @scheme[with-contract] @scheme[body] will use the -@scheme[blame-id] for their negative position.} +@scheme[blame-id] for their negative position. + +If a free-var-list is given, then any uses of the free variables +inside the @scheme[body] will be protected with contracts that +blame the context of the @scheme[with-contract] form for the positive +positions and the @scheme[with-contract] form for the negative ones.} @defform*[[(define/contract id contract-expr free-var-list init-value-expr) (define/contract (head args) contract-expr free-var-list body ...+)]]{ @@ -708,7 +713,12 @@ a contract region. The definition itself is responsible for positive @scheme[id] outside of the definition must meet the negative positions of the contract. Since the contract boundary is between the definition and the surrounding context, references to -@scheme[id] inside the @scheme[define/contract] form are not checked.} +@scheme[id] inside the @scheme[define/contract] form are not checked. + +If a free-var-list is given, then any uses of the free variables +inside the @scheme[body] will be protected with contracts that +blame the context of the @scheme[with-contract] form for the positive +positions and the @scheme[with-contract] form for the negative ones.} @defform*[[(contract contract-expr to-protect-expr positive-blame-expr negative-blame-expr)