From 3df3cd2b9d1b58c547ab3ee10e2edec749a8e98e Mon Sep 17 00:00:00 2001 From: Matthias Felleisen Date: Sat, 14 Jun 2014 15:11:14 -0400 Subject: [PATCH] fixed indexing and typo; Closes PR 14575, Closes PR 14564 --- .../unstable-doc/scribblings/options.scrbl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/unstable-pkgs/unstable-doc/scribblings/options.scrbl b/pkgs/unstable-pkgs/unstable-doc/scribblings/options.scrbl index e6128b9250..d6fbe76a98 100644 --- a/pkgs/unstable-pkgs/unstable-doc/scribblings/options.scrbl +++ b/pkgs/unstable-pkgs/unstable-doc/scribblings/options.scrbl @@ -4,11 +4,17 @@ @(define the-eval (make-base-eval)) @(the-eval '(require racket/contract unstable/options)) -@title[#:tag "options"]{Options} +@title[#:tag "options"]{Option Contracts} @unstable-header[] @defmodule[unstable/options] +This module introduces @defterm{option contracts}, a flavor of behavioral +software contracts. With option contracts developers control in a +programmatic manner whether, when, and how often contracts are +checked. Using this flavor of contracts, Racketeers can mimic any compiler +flag system but also create run-time informed checking systems. + @defproc[(option/c [c contract?] [#:with-contract with boolean? #f] [#:tester tester (or/c (-> any boolean?) 'dont-care) 'dont-care] @@ -82,7 +88,7 @@ is a predicate. In any other case, the result is a contract error. @defproc[(exercise-option [x any/c]) any/c]{ -Returns @racket[x] with contract ckecking enabled if an @racket[option/c] guards +Returns @racket[x] with contract checking enabled if an @racket[option/c] guards @racket[x]. In any other case it returns @racket[x]. The result of @racket[exercise-option] loses the guard related to @racket[option/c], if it has one to begin with, and thus its contract checking status cannot change further.