racket/pkgs/racket-doc/scribblings/reference
Daniel Feltey b16f0b24b7 Improvements to unit/c contracts in preparation for unit support in typed/racket
Changes:

 - Allow unit contracts to import and export the same signature.
 - Add "invoke" contracts that will wrap the result of invoking a unit contract,
   no wrapping occurs when a body contract is not specified
 - Improve error messages
 - Support for init-depend clauses in unit contracts.
 - Fix documentation to refelct the above
 - Overhaul of unit related tests

Handling init-depend clauses in unit contracts is a rather large and somewhat
non-backwards-compatible change to unit contracts. Unit contracts must now
specify at least as many initialization dependencies as the unit value being
contracted, but may include more. These new dependencies are now actually
specified in the unit wrapper so that they will be checked by compound-unit
expressions.

This commit also adds more information to the first-order-check
error messages. If a unit imports tagged signatures, previously the errror
message did not specify which tag was missing from the unit contract. Now
the tag is printed along with the signature name.

Documentation has been edited to reflect the changes to unit/c contracts
made by this commit.

Additionally this commit overhauls all tests for units and unit contracts.
Test cases now actually check that expected error messages are triggered when
checking contract, syntax, and runtime errors. Test forms now expand into uses
of rackunit's check-exn form so only test failures are reported and all tests in
a file are run on every run of the test file.
2015-08-11 16:30:39 -05:00
..
async-channels.scrbl Add documentation for async-channel contracts and impersonators 2015-01-19 19:58:51 -06:00
block.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
booleans.scrbl doc clarifications on eqv? 2015-01-24 10:12:35 -07:00
breaks.scrbl Add break-parameterization?. 2015-03-09 12:40:08 -06:00
bytes.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
channels.scrbl Fix docs on channel synchronization 2015-06-29 17:34:57 -06:00
chaperones.scrbl fix impersonator-property:application-mark propagation 2015-08-07 05:30:25 -06:00
chars.scrbl Unicode 7.0 2015-02-09 11:33:13 -07:00
class.scrbl Implement class sealing/unsealing 2015-05-13 13:21:51 -04:00
cmdline.scrbl fix command-line docs for flags that start "--" 2015-05-31 06:06:22 -06:00
code-inspectors.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
collects.scrbl add setup/collection-search 2015-07-30 14:12:04 -06:00
concurrency.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
cont-marks.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
cont.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
contracts-struct-prop.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
contracts.scrbl Fix bugs/typos in docs for contracts and quote-syntax 2015-07-27 10:47:06 -06:00
control-lib.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
control.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
custodians.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
custom-ports.scrbl Fix typos in docs 2015-07-18 20:44:36 -06:00
custom-write.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
data.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
debugging.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
define-struct.scrbl Replace celcius (a common mispelling) with celsius 2015-07-23 11:21:22 -05:00
dicts.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
ellipses-defn.rkt remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
ellipses.rkt remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
encodings.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
engine.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
enter.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
envvars.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
eval-model.scrbl clarify in docs that threads provide sequential consistency 2015-05-16 15:19:13 -06:00
eval.scrbl add compiled-expression-recompile 2015-08-10 16:39:43 -06:00
evts.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
exit.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
exns.scrbl Add exn->string, following the function of the same name in the web-server. 2015-06-20 21:43:33 +08:00
extflonums.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
extras.css remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
extras.tex remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
fasl.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
file-ports.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
filesystem.scrbl improve docs for file-or-directory-modify-seconds 2015-04-15 08:40:35 -06:00
fixnums.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
flonums.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
for.scrbl minor tweaks to define-sequence-syntax docs 2015-02-11 10:53:40 -06:00
format.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
futures-logging.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
futures.scrbl Merge unstable/future with racket/future. 2015-07-23 11:43:37 -05:00
generic.scrbl add property support to chaperone-generic, etc. 2015-02-19 09:56:50 -07:00
hashes.scrbl toward deterministic bytecode generation 2015-08-07 15:48:39 -06:00
help.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
include.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
info.rkt remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
init.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
interactive.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
io.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
kernel.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
load-lang.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
logging.scrbl Fix docs for racket/logging to be consistent with make-log-receiver's. 2015-07-28 11:26:09 -05:00
macros.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
match-grammar.rkt Add prefab structs to match grammar 2015-08-07 20:11:52 -04:00
match-parse.rkt Add prefab structs to match grammar 2015-08-07 20:11:52 -04:00
match.scrbl Improve match compilation of ? and fix bugs. 2015-06-05 18:08:33 -04:00
memory.scrbl Adding no major collection guarantee to collect-garbage minor collections 2015-07-30 11:42:13 -06:00
model.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
module-reflect.scrbl Add doc examples for dynamic-require 2015-02-12 10:14:52 -07:00
mpairs.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
mz.rkt remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
namespaces.scrbl toward deterministic bytecode generation 2015-08-07 15:48:39 -06:00
networking.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
notation.scrbl switch to set-of-scopes expander 2015-07-16 14:20:00 -06:00
numbers.scrbl Make docs for sgn correct. 2015-04-10 14:25:33 -06:00
os.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
pairs.scrbl check-duplicate -> check-duplicates 2015-07-20 16:00:53 -05:00
parameters.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
paths.scrbl In the docs for normal-case-path, replaced “letter” with “character”, to avoid possible confusion with drive letters. 2015-08-11 07:59:23 -06:00
pipes.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
places-logging.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
places.scrbl Rename open-place to place/context. 2015-07-28 16:14:29 -05:00
plumbers.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
port-buffers.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
port-lib.scrbl add #:name argument to {transplant,relocate}-{input,output}-port 2014-12-11 14:43:34 -06:00
port-line-counting.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
port-procs.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
ports.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
pretty-print.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
printer.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
procedures.scrbl Move contents of unstable/function to racket/function. 2015-07-20 16:00:52 -05:00
prog-steps.rkt remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
promise.scrbl Provide promise/name?. 2015-07-22 14:33:30 -04:00
prop-port.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
read.scrbl toward deterministic bytecode generation 2015-08-07 15:48:39 -06:00
reader-example.rkt remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
reader.scrbl toward deterministic bytecode generation 2015-08-07 15:48:39 -06:00
readtables.scrbl fix doc typos 2015-07-27 10:47:53 -06:00
reference.scrbl Link to the guide and reference source locations 2015-02-10 09:46:40 -05:00
regexps.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
rerequire.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
running.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
runtime.scrbl add peak memory use to vector-set-performance-stats! 2015-01-22 10:16:32 -07:00
rx.rkt remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
sandbox.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
security-guards.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
security.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
semaphores.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
sequences.scrbl add missing history note on stream* 2015-07-30 14:45:29 -06:00
serialization.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
sets.scrbl add free-id sets 2015-05-04 19:05:07 -04:00
shared.scrbl switch to set-of-scopes expander 2015-07-16 14:20:00 -06:00
splicing.scrbl repair for nexted splicing forms that define the same name 2015-07-29 06:11:13 -06:00
startup.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
string-input.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
string-output.scrbl doc clarification on output functions and mutable arguments 2015-05-16 15:04:32 -06:00
string-ports.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
strings.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
struct-inspectors.scrbl Adjust "6.2.0.2" history notes to just "6.2" 2015-04-28 15:36:04 -06:00
struct.scrbl switch to set-of-scopes expander 2015-07-16 14:20:00 -06:00
stx-comp.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
stx-expand.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
stx-ops.scrbl Fix docs for syntax-debug-info 2015-07-27 17:16:57 -04:00
stx-param.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
stx-patterns.scrbl fix docs for syntax-case 2015-04-10 13:30:58 -06:00
stx-props.scrbl make Reference dependency on DrRacket docs indirect 2015-07-21 09:20:29 -06:00
stx-taints.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
stx-trans.scrbl make-syntax-introducer: add optional argument to change kind of scope 2015-07-25 14:37:54 -06:00
subprocess.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
surrogate.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
symbols.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
sync.scrbl Add docs for fsemaphores in the Synchronization section. 2015-03-26 11:23:53 -06:00
syntax-model.scrbl switch to set-of-scopes expander 2015-07-16 14:20:00 -06:00
syntax-util.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
syntax.scrbl adjust some versions in history notes 2015-07-30 14:49:31 -06:00
thread-cells.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
thread-groups.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
thread-local.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
threads.scrbl Fix docs on thread-resume-evt 2015-06-20 21:43:34 +08:00
time.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
trace.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
undefined.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
units.scrbl Improvements to unit/c contracts in preparation for unit support in typed/racket 2015-08-11 16:30:39 -05:00
unix-paths.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
unsafe-undefined.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
unsafe.scrbl Change type of result of unsafe-??vector-ref 2015-01-25 07:51:45 -07:00
values.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
vectors.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
windows-paths.scrbl remove the "racket-pkgs" directory layer 2014-12-08 05:22:59 -07:00
write.scrbl fix docs on print 2015-02-12 10:17:55 -07:00