put contract-property accessors in an itemlist

This commit is contained in:
Benjamin Greenman 2015-12-30 18:25:21 -05:00 committed by Robby Findler
parent 61e21dba22
commit 0f7a946dba

View File

@ -2562,23 +2562,29 @@ These functions build the arguments for @racket[prop:contract],
@racket[prop:chaperone-contract], and @racket[prop:flat-contract], respectively.
A @deftech{contract property} specifies the behavior of a structure when used as
a contract. It is specified in terms of six accessors: @racket[get-name],
which produces a description to @racket[write] as part of a contract violation;
@racket[get-first-order], which produces a first-order predicate to be used by
@racket[contract-first-order-passes?]; @racket[get-projection], which
produces a blame-tracking projection defining the behavior of the contract;
@racket[stronger], which is a predicate that determines whether this contract
(passed in the first argument) is stronger than some other contract (passed
in the second argument) and whose default always returns @racket[#f];
@racket[generate], which returns a thunk
that generates random values matching the contract (using @racket[contract-random-generate-fail])
to indicate failure) or @racket[#f] to indicate
that random generation for this contract isn't supported; @racket[exercise],
which returns a function that exercises values matching the contract (e.g.,
if it is a function contract, it may call the function) and a list of contracts
whose values will be generated by this process; and @racket[is-list-contract?],
which is used by @racket[flat-contract?] to determine if this contract
accepts only @racket[list?]s.
a contract. It is specified in terms of seven accessors:
@itemlist[
@item{@racket[get-name] which produces a description to @racket[write] as part
of a contract violation;}
@item{@racket[get-first-order], which produces a first-order predicate to be
used by @racket[contract-first-order-passes?];}
@item{@racket[get-projection], which produces a blame-tracking projection
defining the behavior of the contract;}
@item{@racket[stronger], which is a predicate that determines whether this
contract (passed in the first argument) is stronger than some other
contract (passed in the second argument) and whose default always
returns @racket[#f];}
@item{@racket[generate], which returns a thunk that generates random values
matching the contract (using @racket[contract-random-generate-fail])
to indicate failure) or @racket[#f] to indicate that random
generation for this contract isn't supported;}
@item{@racket[exercise], which returns a function that exercises values
matching the contract (e.g., if it is a function contract, it may call
the function) and a list of contracts whose values will be generated
by this process;}
@item{and @racket[is-list-contract?], which is used by @racket[flat-contract?]
to determine if this contract accepts only @racket[list?]s.}
]
At least one of the @racket[late-neg-proj], @racket[proj],
@racket[val-first-proj], or @racket[first-order] must be non-@racket[#f].