Asumu Takikawa
a8994c7261
Revert "Add contract-add-context to contract system."
...
This reverts commit f3b687c8ed
.
After discussion with Robby and Stevie, we concluded that
this procedure isn't necessary for now. If we ever think
of more examples where it's useful we can bring it back.
2012-05-08 12:58:49 -04:00
Robby Findler
5996e8f480
finish up struct/dc
2012-05-07 10:36:44 -05:00
Robby Findler
64603d0c27
adjust the opter protocol so that opters can say either: "yes this is
...
a chaperone contract", "no it definitely isn't" or "evaluate this code
at runtime to find out"; previously only the first two options
were available to opters
(this commit also includes other tweaks here and there so won't stand alone)
2012-05-07 10:36:44 -05:00
Robby Findler
04017d83d5
start adding struct/dc contracts
2012-05-07 10:36:39 -05:00
Asumu Takikawa
f3b687c8ed
Add contract-add-context to contract system.
...
This procedure is used to add blame contexts to an
existing contract. This prevents the need to re-create
the contract in order to add blame contexts.
2012-05-04 02:52:46 -04:00
Robby Findler
17a723a63e
Improve the contract error messages:
...
- add context information, so we can see which part of the contract failed
- re-arrange some of the information in the contracts
2012-04-21 16:55:03 -05:00
Stevie Strickland
95d784db84
Fix a ->d contract example in the reference.
2012-04-18 17:42:14 -04:00
Robby Findler
5e03c7cf99
Added struct/dc and cleaned up a bunch of stuff in the contract
...
library (mostly in opt/c)
Specifically:
- add inlining declaration for ->i helper function
- modernized the opt/c contracts and improved them so that mutually
recursive define-opt/c functions recognize each other instead of
bailing out to the slow path.
- added =/c as an optimized contract
- improve the error message for the between and comparison opt
contracts
- adjust the blame struct so the name is created lazily, since opt/c
contracts just stick a copy o the contract into the thunk that
creates the name and we don't want to run those effects twice if we
can help it.
2012-04-12 22:49:50 -05:00
Robby Findler
483dde9ea8
add keywords as values that coerce into contracts
...
adjust 'one-of/c' and 'symbols' so they just use or/c (when possible)
improve or/c's stronger check so that, in the case that or/c is
getting eq or equal contracts, or/c's stronger check is as good as
'symbols'/'one-of/c's stronger check is.
2012-04-06 16:21:07 -05:00
David Van Horn
f029117266
Fixes spelling errors in reference.
2012-02-21 14:21:43 -05:00
Ryan Culpepper
933965b2c2
moved unstable/prop-contract into racket/contract/base
2011-12-18 13:57:50 -07:00
Robby Findler
e0ea64c758
rename contract-generate to contract-random-generate
2011-11-25 09:09:18 -06:00
Robby Findler
b7d2d5da62
Some small cleanups of Andy's contract generator code
2011-11-23 22:54:21 -06:00
Andy Gocke
b8847a53bf
Started on random testing for contracts
2011-11-23 22:54:21 -06:00
Robby Findler
870c8d28f4
move predicate/c from unstable/contract to racket/contract. In process,
...
change the implementation to special case struct procedures and to use
it in provide/contract.
This speeds up the rendering phase of the Guide documentation by more than 2x.
Thanks to Matthew for spotting the opportunity!
2011-11-13 17:19:15 -06:00
Robby Findler
8edfd4e87e
add docs for the #:stronger argument to the contract constructors
...
closes PR 12312
2011-10-31 16:59:19 -05:00
Robby Findler
48f9b8895c
add documentation for racket/contract/base (also trim some
...
of the longer lines in the file)
closes PR 12311
2011-10-25 16:16:23 -05:00
Robby Findler
533b898277
clarify the role of the #:rest portion of the contract
...
closes PR 12244
2011-10-01 15:58:50 -05:00
Matthew Flatt
e226dd7e26
add `contract-out'
2011-09-24 22:30:56 +09:00
Eli Barzilay
d61eb53686
Lots of documentation formatting.
...
Started as fixing misindented definitions, then more indentations, then
a bunch of similar things (square brackets, huge spaces at end-of-lines,
etc).
2011-08-15 07:50:04 -04:00
Ryan Culpepper
73230537ba
removed merge conflict artifact
...
Merge to release branch
2011-07-08 15:34:59 -06:00
Eli Barzilay
ac26fe7554
A ton of @scheme*' ->
@racket*' and related updates.
...
Also, updates some of the mzlib files to point at `racket/*' libraries
rather than to `scheme/*' ones.
2011-06-25 04:08:47 -04:00
Asumu Takikawa
7f143f03ed
Add impersonator-contract? along with docs/tests.
...
The impersonator-contract? function checks if its argument is
a contract that is neither flat nor a chaperone contract.
2011-05-26 00:37:05 -04:00
Robby Findler
1fdfd8406d
made sure that all of the mzlib/contract exports are documented
...
(some by using racket/contract exports and some by adding
more docs)
2011-04-25 11:54:14 -05:00
Robby Findler
be1a0e62f7
added docs for current-contract-region
2011-04-25 11:53:23 -05:00
Robby Findler
21cbd9ad81
added the racket/contract/combinator library,
...
and documented and adjusted these libraries:
racket/contract/base
racket/contract/exists
racket/contract/parametric (renamed from exists)
racket/contract/region
2011-04-25 11:51:44 -05:00
Stevie Strickland
bdd5ac2d41
Document prop:contracted and impersonator-prop:contracted.
2011-04-15 16:29:17 -04:00
Robby Findler
ec50a8c5a2
additional fixes to the docs and racket/contract's exports to make them match up
2011-04-15 12:44:44 -05:00
Robby Findler
570a3e58b9
renamed parametric/c to parametric->/c
...
and cleaned up the organization of the related files
2011-04-09 21:45:49 -05:00
Ryan Culpepper
f49412add8
moved unstable/poly-c to racket/contract/parametric
2011-04-08 08:25:22 -06:00
Matthew Flatt
0b496d5275
a round of doc corrections from Gwyth
2011-03-10 06:34:33 -06:00
Robby Findler
07a2ace943
added the #:pre/name and #:post/name keywords to ->i
2011-02-25 13:42:09 -06:00
Robby Findler
4b68377af1
Revert "started adding comments to the #:pre and #:post parts of ->i"
...
This reverts commit a27b7d5c61
.
ack, sorry.
2011-02-25 09:44:34 -06:00
Robby Findler
a27b7d5c61
started adding comments to the #:pre and #:post parts of ->i
2011-02-25 09:42:23 -06:00
David Van Horn
c9519fd113
Fixed various spelling errors.
2011-02-03 17:42:33 -05:00
Robby Findler
51ad306af2
changed real-in to be an alias for between/c
2011-01-04 15:40:32 -06:00
Matthew Flatt
3bb120545f
fix ~300 typos reported by Vladimir Nesterovich (a.k.a. Gwyth)
...
--- but Gwyth's amazingly helpful review of chapters 1-11
pointed out a few problems that are more difficult to fix
and are still pending
2011-01-04 09:53:31 -07:00
Stevie Strickland
37349ca053
Allow uses of recursive-contract to specify the type of contract to create.
2010-12-07 18:30:20 -05:00
Stevie Strickland
5b8e5d6380
Extend struct/c to allow impersonator contracts for mutable fields.
...
Also, flat contracts for immutable fields are only evaluated at contract
wrapping time.
2010-12-07 14:29:07 -05:00
Stevie Strickland
10eb818f95
Conversion of struct/c to chaperones when appropriate.
2010-12-07 04:11:26 -05:00
Robby Findler
5a9c469b0f
added forall to go along with exists contracts
2010-11-11 14:39:43 -06:00
Matthew Flatt
7f67b6569c
v5.0.99.2: proxy' ->
impersonator'
2010-11-08 06:23:16 -07:00
Matthias Felleisen
c83cf15695
fixed some typos, and in the process rewrote some prose
2010-11-06 10:19:24 -04:00
Stevie Strickland
2c940a7fd0
Alter the documentation for vector contracts to match the new implementations.
2010-09-16 15:04:41 -04:00
Stevie Strickland
c8737d5615
Separate out vector-related contract combinators into a new file.
2010-09-16 15:04:41 -04:00
Stevie Strickland
fce93a2d98
Altering the box/c and box-immutable/c documentation.
2010-09-15 17:17:38 -04:00
Stevie Strickland
b8fb6dae9a
Initially just move the box-related combinators to a new location.
2010-09-15 16:53:18 -04:00
Stevie Strickland
a838fa0606
Fixing the docs for the new hash/c combinator.
2010-09-15 15:04:27 -04:00
Stevie Strickland
f5b62ececd
Separate out hash/c code into a separate module.
2010-09-15 11:22:57 -04:00
Stevie Strickland
a1c188ae74
Add appropriate documentation for the new chaperone contract forms.
2010-09-15 10:11:10 -04:00