Commit Graph

1861 Commits

Author SHA1 Message Date
Asumu Takikawa
e14c5d61e9 Allow guards for impersonatable struct type properties 2012-07-19 22:46:14 -04:00
Eli Barzilay
6565538b09 Disable the #:before-first' and #:after-last' functionality in `add-between'.
Leave it working in splicing mode.  I prefer doing that over always
splicing them, since that would make a less uniform interface, so I
rather keep all options open.  There is no longer a `#:nothing' keyword,
which is the main point of this downgrade.

(See mailing list discussion on "no-argument" for the reason.)
2012-07-18 22:28:41 -04:00
Matthew Flatt
a3b316c02f typo 2012-07-18 03:52:20 -06:00
Matthew Flatt
5e4866e54c fill in one more corner of submodules and `namespace-attach-module'
When submodules are not independently loaded, then pull submodule
declarations along when attaching a module to a namespace.
2012-07-17 10:16:32 -06:00
Matthew Flatt
c8f4ac6ae4 submodules: make .zo path stick for consistent independent loading
When a module is loaded from bytecode and then the value of
`use-compiled-file-paths' changes, an attempt to load a submodule
would fail, because source isn't used if the main module is
already declared, and the bytecode code is not used according to
`use-compiled-file-paths'. Make the bytecode path stick when it
is used once, so that submodule loads succeed, and make it work
even with `namespace-module-attach'.

The module-attach part of this protocol requires a change to the
API of a module name resolver: the notification mode gets two
arguments, instead of one, where the second argument is an
environment.
2012-07-17 09:47:05 -06:00
Matthew Flatt
8718a5dd62 doc and error-message fixes for module name resolver 2012-07-16 19:22:30 -06:00
James Swaine
b987be068e Move racket/future/visualizer, racket/future/trace --> future-visualizer, future-visualizer/trace 2012-07-16 12:23:46 -05:00
Asumu Takikawa
403aaac7d4 Moved some mzlib library implementations to racket
The libraries moved were:
  - mzlib/control      => racket/control
  - mzlib/date         => racket/date
  - mzlib/deflate      => file/gzip
  - mzlib/inflate      => file/gunzip
  - mzlib/port         => racket/port
  - mzlib/process      => racket/system
  - mzlib/runtime-path => racket/runtime-path
  - mzlib/shared       => racket/shared
  - mzlib/unit         => racket/unit
  - mzlib/unit-exptime => racket/unit-exptime
  - mzlib/zip          => file/zip

The old modules in mzlib are now pointers to the
new modules. These are all modules that were already
redirected in the documentation.
2012-07-11 18:26:10 -04:00
Matthew Flatt
daa98b4e33 syntax/location: repair after `variable-reference->module-source' fix 2012-07-10 18:35:03 -06:00
Matthew Flatt
506b70f71f fix `variable-reference->module-source' for submodules
Unlike the `variable-reference->resolved-module-path', the module
source one doesn't include a submodule path.
2012-07-10 18:35:03 -06:00
James Swaine
dbec8765e3 Futures visualizer - reorganize modules, expose formerly private stuff as public (and docs) 2012-07-10 10:55:19 -05:00
James Swaine
b6f71ec4be Add futures visualizer, improvements to futures logging 2012-07-10 10:54:42 -05:00
Asumu Takikawa
a1aedaff1e Fix doc typos 2012-07-06 18:59:10 -04:00
Matthew Flatt
1d378186f4 repair to exn doc repairs 2012-07-06 16:48:36 -06:00
Matthew Flatt
4c469d5338 improve docs on gensym', generate-temporaries', and compiled code 2012-07-06 13:17:35 -06:00
Matthew Flatt
891b882ee6 doc clarification on exception handlers 2012-07-06 13:17:35 -06:00
Robby Findler
4cd26f828f typo in error docs 2012-07-03 19:55:08 -05:00
Asumu Takikawa
414ed2597e Reference: fix doc typos 2012-07-03 03:10:04 -04:00
Asumu Takikawa
e8dfd1d8df Improve docs for exn:fail:contract:blame 2012-07-03 02:16:13 -04:00
Matthew Flatt
aa68692b37 allow `begin' wrapper on a submodule to re-expand
Closes PR 12835
2012-07-02 10:02:41 -06:00
Asumu Takikawa
07d279e3ee racket/class: doc fixes and improvements
- actually fixed the grammar this time
 - examples for most class/object utils
 - consistency with naming conventions
 - interface ctc example
2012-06-30 15:13:53 -04:00
Asumu Takikawa
9e97ea4cae Fix class init grammar in docs 2012-06-29 14:40:27 -04:00
Asumu Takikawa
ad8b43e21f Add examples for most class clauses. 2012-06-29 14:40:27 -04:00
Stevie Strickland
d16c3f68fa Add empty case for with-contract's clause for free variable contracts.
Also reorder the single and multiple cases to match result-spec's ordering.
2012-06-28 03:28:04 -04:00
Matthew Flatt
1d25f698da doc clarifications 2012-06-27 13:20:18 -06:00
Eli Barzilay
81e0bd2382 Use `secref' instead of a direct link to docs.racket-lang.org. 2012-06-27 09:26:28 -04:00
Asumu Takikawa
095d47fc3d racket/contract: rename prompt/c & continuation-mark/c
The new names are `prompt-tag/c` and `continuation-mark-key/c`
to keep the names consistent with the values that are being
contracted. Also updated the HISTORY file.
2012-06-26 21:11:58 -04:00
Asumu Takikawa
fcab398081 racket/class: add send+ for functional style OO 2012-06-26 21:11:58 -04:00
Eli Barzilay
0c78194267 Adjust the keyword names for string-join' following the change to add-between'. 2012-06-26 13:45:16 -04:00
Asumu Takikawa
ddf91c201a Documentation for mark key proxies and contracts 2012-06-26 13:39:36 -04:00
Matthew Flatt
a6e263741a racket/list: adjust `add-between' keyword handling
Add a `#:nothing' argument so the no-value value can be
made explicit --- based on discussion with Eli, but pending
further review.

Also, renamed `#:first' to `#:before-first' and `#:last' to
`#:after-last' to be more clear, more parallel ro `#:before-last',
and avoid a collision with prominent function names.
2012-06-26 11:00:11 -06:00
Asumu Takikawa
552d6de953 racket/generics: add contract combinator
The generics library now generates a `name/c` macro
for a generic interface `name`. The combinator can be
used to contract instances (or constructors) of a
generic interface across standard contract boundaries.
2012-06-25 20:33:48 -04:00
Stephen Chang
91ea9ab309 add examples to read-language docs 2012-06-25 19:46:20 -04:00
Kevin Tew
89c7ba6493 Fix *channel-get's use of continuations
Cleanup map-reduce.rkt
Cleanup rmpi.rkt
Added create-place-node and distributed-place-wait
2012-06-25 14:03:05 -06:00
Matthew Flatt
2c1e02d148 fix `help' docs
Use one `defform*' instead of `deftogether' and many `defform/none's.
2012-06-25 08:21:55 -06:00
Matthew Flatt
0532baa228 doc correction and improvement 2012-06-25 08:17:17 -06:00
Matthew Flatt
c11527494e racket/port: fix problems with `read-bytes!-evt'
See PR 12860; some of problem related to the PR were "fixed" by
adjusting the guarantees that are specified in the documentation.

Another problem was that non-consecutive bytes could be returned.
2012-06-24 07:38:09 -06:00
Matthew Flatt
91791983aa fix indentation of some error messages
`raise-syntax-error' and `raise-arguments-error' do not
try to adjust indentation, anymore, because it's too confusing
2012-06-23 02:20:59 -07:00
Matthew Flatt
4323096a46 change contract on second' of date' to allow only 1 leap second 2012-06-23 02:04:55 -07:00
Matthew Flatt
ff8a062bfe guarantee `current-seconds', etc. from 1/1/1970 UTC
For all currently supported platforms, the result was already
portable, despite the documentation's hedging.

Also fixed up the documentation in other ways, such as the fact
that `seconds->date' returns a `date*'.
2012-06-23 02:04:55 -07:00
Matthew Flatt
b951978a77 fix `impersonate-struct' docs
Move some constraints from `chaperone-struct' docs to `impersonate-struct'
docs.

(Problem reported by Eric Dobson.)
2012-06-23 02:04:54 -07:00
Eli Barzilay
f0d856ab7a Extend string-join' in a similar way to add-between'.
(This is actually the extension that made me do the other too.)
2012-06-23 04:44:20 -04:00
Eli Barzilay
728687d9dc Extend `add-between'.
New keywords: `#:first', `#:before-last', `#:last', and `#:splice?'.
2012-06-23 04:44:20 -04:00
Asumu Takikawa
e4f216244a Fix typos and wording in chaperone docs 2012-06-22 17:57:58 -04:00
Eli Barzilay
7ec9975736 Move regexp-replaces' from ffi/unsafe' to `racket/private/string'.
* The old function was removed completely, people will get it from
  `racket/base' anyway.

* I also removed its documentation.  I thought about leaving a note in,
  but if `define-ffi-definer' is the preferred style, then this should
  be done when there's a way to make `define-ffi-definer' use it.  (Eg,
  some new #:keyword that adds a way to change the defined name.)

* Note that the function is added to `racket/private/string' and not to
  `racket/string' because the latter deals only with strings, and the
  new function accepts byte strings too.  It might be better to start a
  new `racket/regexp' module for these functions.
2012-06-22 14:27:14 -04:00
Eli Barzilay
7b4772e120 Extend `regexp-replace*' to accept a start/end-position.
Note that this pushes the `ipre' argument to the end.
2012-06-22 12:00:48 -04:00
Asumu Takikawa
af73e6f274 Typo in impersonate-hash docs 2012-06-22 00:12:24 -04:00
Asumu Takikawa
1dced5f560 racket/unit: fix literals in docs 2012-06-21 23:37:11 -04:00
Matthew Flatt
1dc0072d03 further error message convention refinements
Add extra intitial-message lines, use "..." on a field name
to indicate that it could reasonably be hidden by default,
and refine some existing messages.
2012-06-22 09:47:59 +08:00
Neil Toronto
25c5e87929 Added docs for pi.f, corrected pi's contract, added examples 2012-06-21 13:53:09 -06:00
Matthew Flatt
40c892ff80 futures: future-local handling of stack overflow
Includes the addition of 'overflow and 'start-overflow-work
events, whcih are effectively specializations of 'sync and
'start-work to expose overflow handling.

Also, fix a bug related to a potential GC during mark-stack
restore from a lightweight continuation.
2012-06-21 07:14:50 +08:00
Robby Findler
2d8f41bfb9 clarify has-contract? and prop:contracted relationship 2012-06-18 11:26:27 -05:00
Asumu Takikawa
5d232f3748 racket/control: add aliases and update %/fcontrol
Added alises for call-with-continuation-prompt,
abort-current-continuation, and call-with-composable-continuation.
Also allow % and fcontrol to take an optional prompt tag argument.
2012-06-14 17:33:43 -04:00
Eli Barzilay
a7064d5f6a A bunch of typo fixes from Richard Cleis. 2012-06-14 17:20:05 -04:00
Eli Barzilay
5e902b2191 Minor typo. 2012-06-14 15:46:53 -04:00
Asumu Takikawa
6c569415cc Update list of redirected procedures in docs 2012-06-13 14:28:01 -04:00
Matthew Flatt
a871574318 make #%plain-module-begin' transformer detect module*' in stop list 2012-06-13 17:07:06 +08:00
Asumu Takikawa
4ce4d7531b Improve docs & errors for control proxies
In particular, use consistent terminology for errors
and provide usage examples
2012-06-12 12:16:56 -04:00
Asumu Takikawa
87ecb55d40 Documentation for control proxies & prompt/c 2012-06-11 18:18:37 -04:00
Asumu Takikawa
c9fd4ef538 Fix docs for impersonate/chaperone-box 2012-06-11 17:28:38 -04:00
Vincent St-Amour
ede83be3fb Fix docs for unsafe-flmin and unsafe-flmax.
Closes PR12826.
2012-06-09 09:20:55 -04:00
Matthew Flatt
fbb6a294f3 local-expand' allows a stop list to have only module*'
That is, when the sto plist contains only `module*', core
forms are not implicitly added to the stop list.
2012-06-08 16:08:55 +08:00
Neil Toronto
b7fea6be5a Fixed contracts on exact-round, etc. 2012-06-06 16:16:52 -06:00
Neil Toronto
e644e6afb1 Documented new additions to racket/math 2012-06-06 11:31:49 -06:00
Matthew Flatt
900b66332c adjust `racket/generic' documentation style 2012-06-03 04:50:06 +08:00
Sam Tobin-Hochstadt
725854f66c Flag booleans *follow* the arguments for optional keywords. 2012-06-01 14:50:39 -04:00
Robby Findler
37ebbfa635 adjust global-port-print-handler's documented contract to match
what it does (and what the text says)
2012-05-30 22:31:55 -05:00
Matthew Flatt
74844152bc fix load handlers to match docs on parameters
Problems exposed by setting `read-accept-lang' to #f.
2012-05-29 13:57:32 -06:00
Matthew Flatt
def4da4f9a doc fix
Closes PR 12796
2012-05-29 11:01:52 -06:00
Matthew Flatt
26269c329e racket/base: add some missing predicates
The new predicates are `progress-evt?' `thread-cell-values?',
`prefab-key?', `semaphore-peek-evt?', and `channel-put-evt?'.
These were used internally, and now they appear in contract
error messages.
2012-05-29 11:01:52 -06:00
Matthew Flatt
0c303ca9cd racket/cmdline add `#:ps' clause 2012-05-29 11:00:43 -06:00
Matthew Flatt
99635ab091 change `impersonate-struct' to require evidence that a field is mutable
When supplying an accessor to redirect, either the corresponding field
must be accessible through the current inspector, or a mutator for
the same field must be redirected, too.

Stevie realized that we need this constraint; otherwise, impersonators
can implement mutator-like behavior even when the mutator is otherwise
secret.
2012-05-27 15:37:45 -06:00
Matthew Flatt
6eeb8fccbd more error-message conversion 2012-05-27 09:03:19 -06:00
Matthew Flatt
8ab87a9fcc racket/class: new error message convention 2012-05-26 21:08:21 -06:00
Asumu Takikawa
81d13ee7ed racket/generic: doc improvements 2012-05-26 13:53:43 -04:00
Matthew Flatt
d6774d5d54 racket/sandbox: add sandbox-propagate-exceptions 2012-05-25 18:37:29 -06:00
Matthew Flatt
9e7548de61 new error message convention
Add `raise-argument-error', `raise-result-error', `raise-arguments-error',
and `raise-range-error'.

The old convention was designed for reporting on a single (sometimes very
long line). The new convention is

 <name>: <short message>
   <field>: <detail>
   ...

If <detail> is long or itself spans multiple lines, then it may
also use the form

   <field>:
    <detail>

where each line of <detail> is indented by 3 spaces.

Backtrace information is shown as a multi-line "context" field.
2012-05-25 15:08:05 -06:00
Vincent St-Amour
cee88f05dd Docs for gen:custom-write. 2012-05-24 16:51:14 -04:00
Vincent St-Amour
13b82e9a59 Reorder docs. 2012-05-24 16:51:14 -04:00
Asumu Takikawa
a22633e348 Rename generics => generic. 2012-05-24 16:51:14 -04:00
Vincent St-Amour
11dc825126 Forge gen:equal+hash and gen:custom-write to provide them from racket/base. 2012-05-24 16:51:13 -04:00
Vincent St-Amour
3210cd1d12 Remove vestigial set of parens and fix docs for new syntax. 2012-05-24 16:51:12 -04:00
Vincent St-Amour
94bd484a66 Resolve collision between class generics and struct generics. 2012-05-24 16:51:12 -04:00
Vincent St-Amour
02055aa1b3 Add remark about auxiliary definitions in method blocks. 2012-05-24 16:51:12 -04:00
Vincent St-Amour
390cd02b52 Have a generic interface for equal+hash.
Currently provided by racket/struct, for lack of a better place.
2012-05-24 16:51:11 -04:00
Asumu Takikawa
8ac82eaf58 Use simplified interface for define-generics
Also removed `generics`
2012-05-24 16:51:09 -04:00
Vincent St-Amour
3bfaa2b00b New naming convention for generics names. 2012-05-24 16:51:07 -04:00
Asumu Takikawa
f866e34b26 Expand documentation on sequence/stream extension 2012-05-24 16:51:06 -04:00
Asumu Takikawa
3a93df5566 Use racket/generics for extensions to racket/stream 2012-05-24 16:50:44 -04:00
Vincent St-Amour
991cb5f371 Hide #:coerce-method-table from the public generics API. 2012-05-24 16:50:43 -04:00
Vincent St-Amour
d5de436b9c Add a pointer to generics in the struct property docs. 2012-05-24 16:50:42 -04:00
Vincent St-Amour
448ad27a37 Move generics to racket/generics.
After discussion with Eli.
2012-05-24 16:50:42 -04:00
Vincent St-Amour
17bb9073b9 Document new dict extensibility API. 2012-05-24 16:31:32 -04:00
Eli Barzilay
f55eba70c0 Just have string-replace' now, with an #:all?' keyword (defaulting to #t). 2012-05-24 10:40:20 -04:00
Eli Barzilay
784857e9fa Add `string-split'. 2012-05-24 10:40:20 -04:00
Eli Barzilay
dcf2754a57 Clarify `regexp-split' on an empty input.
The text that says that (regexp-split #rx"whatever" "") returns '("")
rather than '() is

  If `input' contains no matches [...] the result is a list containing
  input’s content [...] as a single element.

This is a little implicit, if you consider such an input as having
nothing left to match over so it's as if there is no input (with a port
this confusion is a little clearer).

Clarify with an example in the docs, and also add tests.
2012-05-24 10:40:20 -04:00
Eli Barzilay
29beae55c1 Redo string-trim' and string-normalize-spaces'.
This is following the mailing list discussion.  In addition get
`string-join' more in-line with these by making its `sep' argument
default to a space.
2012-05-24 10:40:20 -04:00
Asumu Takikawa
b50a2c7518 Add documentation for abstract clause. 2012-05-22 15:59:16 -04:00
Kevin Tew
83c26eef4b [Distributed Places] a few of Eli's documentation suggestions 2012-05-20 22:50:58 -06:00
Matthew Flatt
2d7521c78c racket/place/distributed: fix doc problems
Various repairs --- especially to avoid duplicated prose.

Instead of

 @(define explain @t{Long explanation about X...})

 @defproc[(a ....) ....]{ .... @|explain| }
 @defproc[(b ....) ....]{ .... @|explain| }
 @defproc[(c ....) ....]{ .... @|explain| }

write

 @defproc[(a ....) ....]{ .... Long explanation about X ... }
 @defproc[(b ....) ....]{ .... X is like @racket[a].  }
 @defproc[(c ....) ....]{ .... X is like @racket[a].  }

Otherwise, a reader is forced to reverse-engineer the
abstraction underlying `a', `b', and `c'.
2012-05-20 14:11:17 -06:00
Matthew Flatt
a39d16fab4 doc layout repair 2012-05-20 07:39:05 -06:00
Matthew Flatt
b7d5aed8d7 add "alias" and "converted-arguments-variant" properties
The properties appear in the inlining expansion of an application
of a keyword-accepting function, and they're mainly intended for
use by Typed Racket.

The property keys are hidden, so that the property value can be
trusted as originating from `racket/base'. The accessor functions are
`syntax-procedure-alias-property' and
`syntax-procedure-converted-arguments-property' from
`racket/keyword-transform'.
2012-05-17 10:58:22 -06:00
Matthew Flatt
3fbbf7cf94 add note about find-executable-path' to subprocess', etc. 2012-05-16 09:43:23 -06:00
Matthew Flatt
65313a82a7 add a #:build?' argument to directory-list' 2012-05-16 09:43:23 -06:00
Matthew Flatt
9270936a28 instantiate require'd modules in the order that they are require'd
This order is now specified, whereas the order was previously unspecified,
and the previous reverse order was an artifact of the implementation.
2012-05-16 07:12:27 -06:00
Robby Findler
3fceae2715 adjusted the contract error messages so that the words expected/promised
are switched in and out based on the sense of the blame (similar to a recent
change that made given/produced swap in and out)
2012-05-15 22:08:42 -05:00
Matthew Flatt
b5ce4f281d fix example
Closes PR 12723
2012-05-15 20:11:42 -06:00
Matthew Flatt
e35337dcfd add `relative-in' 2012-05-15 20:03:41 -06:00
Matthew Flatt
1067aa59e3 fix docs for `syntax-local-module-exports' 2012-05-14 21:57:10 -06:00
Matthew Flatt
0653d1c966 add `syntax-local-submodules' 2012-05-14 21:57:09 -06:00
Matthew Flatt
1bf1564f90 add `variable-reference->module-path-index' 2012-05-14 21:57:09 -06:00
Kevin Tew
fbbf8579e0 [Distributed Places] Docs clean up part 2 2012-05-14 14:58:40 -06:00
Matthew Flatt
84d1c6dc06 remove sfi links from the Reference
In consultation with Ryan. We'd prefer to have versions of all
useful things in a `racket/...' library that is consistent as
possible with Racket forms and conventions.
2012-05-13 06:57:44 -06:00
Matthew Flatt
906180ebe8 doc edits 2012-05-13 06:57:44 -06:00
Matthew Flatt
1d1f4dfc3c fix docs on `prop:{require,provide,provide-pre}-transformer' 2012-05-13 06:57:44 -06:00
Matthew Flatt
45659b0cc1 fix doc example
Closes PR 12768
2012-05-13 06:57:44 -06:00
Robby Findler
52fa588f7a deprecate define-contract-struct (also fix a broken require in the contract docs) 2012-05-12 22:10:04 -05:00
Matthew Flatt
bfbccb918d fix reference to non-existant private contract module 2012-05-12 01:37:51 -06:00
Matthew Flatt
dbd940611e allow #f as shift for `syntax-shift-phase-level' 2012-05-12 00:55:12 -06:00
Kevin Tew
4c59943b0d [Distributed Places] Remove caps and camelcase 2012-05-10 19:58:52 -06:00
Kevin Tew
154a96ab1f [Distributed Places] Docs clean up part 1 2012-05-10 15:36:58 -06:00
Kevin Tew
076e698e8c [Distributed Places] RMPI docs 2012-05-10 15:36:58 -06:00
Kevin Tew
c619f7cbbf [Distributed Places] more docs, removed old functions, RMPI function renames 2012-05-10 15:36:58 -06:00
Eli Barzilay
7738f21a5b Move the srfi references to the section ends. 2012-05-09 04:11:17 -04:00
Eli Barzilay
f1a7517ab6 Adds note about `system*' output.
(Slightly revised by Eli.)
2012-05-09 03:48:55 -04:00
Michael W
267a009e03 Adds note about system* output. UNTESTED 2012-05-09 02:46:33 -04:00
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
Matthew Flatt
9a41129c69 racket/flonum: add `flexpt' 2012-05-07 20:41:14 -06:00
Ryan Culpepper
eb3dce14cd fix some doc contracts for submodules 2012-05-07 14:46:13 -06:00
Ryan Culpepper
6c6fa36c8c add srfi links 2012-05-07 14:46:13 -06: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
6f4ad1de25 Add contracts to interface syntax & structures 2012-05-04 17:24:55 -04:00
Jose Antonio Ortega Ruiz
6f0e79feff Fixes for trivial typos in Reference sec. 1.2.
(Eli: Ancient commit on the mailing list that wasn't merged...  Most
things were already fixed.)

Signed-off-by: Jose Antonio Ortega Ruiz <jao@gnu.org>
2012-05-04 17:24:07 -04: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
Matthew Flatt
4292c6e037 fix docs for `box-cas!', fix JITted version to check mutability 2012-05-03 21:38:36 -06:00
Matthew Flatt
23d46620f2 documentation tweaks 2012-05-03 19:22:46 -06:00
Aaron Turon
868dcb6d57 Add box-cas!' and unsafe-box*-cas!'.
These primitives atomically update a box to a new value, as long
as the current value is the same as a provided value.  They also
are future-safe.

When futures are enabled, they use low-level hardware instructions
to perform the change atomically.
2012-05-03 19:19:24 -06:00
Matthew Flatt
1b0f6cc995 doc repair
Closes PR 12708
2012-05-03 11:11:38 -06:00
Eli Barzilay
ed2b579e3c Fail early on a non-pair input to `list-ref'.
There's no index that works with non-pairs, and the generic error
message in such cases is confusing.

Closes PR12740.
2012-05-03 10:24:05 -04:00
Asumu Takikawa
db02ad9b75 Add pointers to the Guide in Reference docs. 2012-05-01 14:57:14 -04:00
Vincent St-Amour
cda496d4ed Doc fixes.
One is from Eric Hanchrow.
2012-04-30 14:13:32 -04:00
Matthew Flatt
a8ca75b773 fix documentation example for `protect-out'
The example relied on the current code inspector affecting
syntax object created during `eval', but since the switch
from certificates to taints, the relevant code inspector is
determined by the namespace, and a namespace gets its code
inspector at creation time.

Closes PR 12717
2012-04-25 19:54:00 -06:00
Matthew Flatt
9ba663aa77 preserve submoduleness in module path index for expanded submodules
The preserved path is exposed by a new `module-path-index-submodule'
function, and `module-path-index-join' now accepts an optional
submodule path.

Also, fixed a problem with `collapse-module-path-index' when
a module path indx is built on a resolved module path that
is a submodule path.

In addition to the main repair, `collapse-module-path[-index]' is
correctly documented to allow '(quote <sym>) rel-to paths.

Finally, `collapse-module-path-index' changed to use a symbolic
resolved module path that appears as the base of a module path
index, rather than falling back to the given rel-to path. It's
possble that the old beavior was intentional, but it wasn't tested,
and it seems more likely to have been a bug.

Closes PR 12724
2012-04-24 21:10:28 -06: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
Eli Barzilay
6f215759ae Add string-trim' and string-normalize-spaces'. 2012-04-19 16:02:03 -04:00
Matthew Flatt
659ff05143 refine some contracts related to submodule paths
Merge to 5.3
2012-04-19 12:45:28 -06:00
Stevie Strickland
95d784db84 Fix a ->d contract example in the reference. 2012-04-18 17:42:14 -04:00
Eli Barzilay
1c9de39348 Rename #:gap-select' -> #:gap-select?' and some minor doc fixes. 2012-04-17 15:56:10 -04:00
Matthew Flatt
2d6073f59f docs: will executors are synchronizable events
Merge to 5.3
2012-04-15 05:37:35 -06: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
Sam Tobin-Hochstadt
fdb70316f1 Fix documentation for `implies'. 2012-04-12 16:28:52 -04:00
Kevin Tew
823c091e8b [Distributed Places] cleanup docs 2012-04-09 13:15:00 -06:00
Matthew Flatt
f968ca3db6 add `gc-info' to doc index 2012-04-08 17:16:36 -06:00
Matthew Flatt
971bee1d4b fix docs for `dump-memory-stats' 2012-04-06 18:51:10 -06: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
Matthew Flatt
c83df32440 try to improve docs for `make-keyword-procedure' 2012-03-31 07:45:53 -06:00
Kevin Tew
f777020eef [Distributed Places] Renamed uses of vm to node, removed export of coercion functions 2012-03-30 11:58:39 -06:00
Matthew Flatt
dfca7d89d9 documentation clarification 2012-03-29 06:46:58 -06:00
Kevin Tew
7fde2894d1 Distributed place cleanup due to feedback from Matthew
Removed use of (get-current-module-path)
Removed /2s
Removed use of vm and compute adjetives
2012-03-28 18:53:37 -06:00
Matthew Flatt
ae89e210fb allow (submod "..")' as a shorthand for (submod "." "..")'
Also, `(submod ".")' is allowed as a module path; it's not useful,
but it makes the grammar slightly more regular.
2012-03-22 18:43:11 -06:00
Matthew Flatt
876bc6f02b doc corrections and improvements related to submodules
In particular, add `module+' to the Guide.
2012-03-22 15:12:55 -06:00
Robby Findler
f77467311a specify 'angle's range 2012-03-21 16:59:53 -05:00
Matthew Flatt
5551e287da fix typo 2012-03-19 14:34:33 -06:00
Matthew Flatt
e01ebf6095 try module+' in place of slice' 2012-03-13 14:31:40 -06:00
Eli Barzilay
0eb5f09e23 Add #:match-select' and #:gap-select' keyword arguments to
`regexp-match*', and the two `-positions' variants.
2012-03-13 10:29:14 -04:00
Matthew Flatt
facc8db712 change module-path?' to subsume path?'
Although th eoriginal idea was to distinguish "text" paths
from derived filesystem paths, practically everythign that accepts
a module path also accepts a path. Building the generalization into
`module-path?' makes it easier to support `submod' wrappers on paths,
and it seems to fix things rather than break them.
2012-03-12 21:08:54 -06:00
Matthew Flatt
060515b9cd extend string-literal syntax to allow surrogate-style \u pairs
For example, "\uD834\uDD1E" is another way to write "\U01D11E",
while "\uD834", "\uDD1E" or "\uDD1E\uD834" are still errors.
2012-03-12 21:03:20 -06:00
Jay McCarthy
f8325776cf racket/slice, expand raco test, remove begin-for-testing 2012-03-09 19:51:42 -07:00
Jay McCarthy
b73444a0f3 Adding module**, when-testing, and raco test 2012-03-09 15:54:18 -07:00
Kevin Tew
2584cb71c1 Remove /opt/plt paths from docs 2012-03-09 12:46:14 -07:00
Matthew Flatt
3a1e8803ff fix errortrace for submodules 2012-03-09 10:34:56 -07:00
Matthew Flatt
566759a5fa progress on submodule docs; bug fixes 2012-03-09 10:34:56 -07:00
Matthew Flatt
3d69dfab86 first cut at submodules 2012-03-09 10:34:56 -07:00
Kevin Tew
c46cdf63bc Comment out ssh to localhost example. 2012-03-08 21:50:45 -07:00
Kevin Tew
09bed0d61e Initial Distributed Places commit
Distributed Places allows the spawning of remote racket processes and
places.  Distributed Places communicate transparently over TCP sockets.
2012-03-07 09:36:13 -07:00
Matthew Flatt
5630a3a1ca racket/sandbox: use `gui-available?' at sandbox creation
Previously, sandbox creation used `gui?', which is the result of
`gui-available?' at the time that `racket/sandbox' is instanited.
This change makes sandbox behavior less sensitive tothe order in
which modules `require'd into a program are intiantiated.

The change depends on a new `sandbox-make-namespace' default
function for `sandbox-namespace-specs'. The new function uses
either  `make-base-namespace' or `make-gui-namespace', depending
on whether the GUI library is available at that point.

A new `sandbox-gui-enabled' parameter can disable use of the
GUI library even if it is available.

The `gui?' binding is still exported for backward compatibility,
but it shouldn't be used anymore.
2012-03-02 07:47:16 -07:00
Eli Barzilay
f7c67b49a4 Big newline at EOF scan. 2012-02-29 00:28:11 -05:00
Vincent St-Amour
249c1cc666 Remove dependency on unstable/port. 2012-02-28 16:26:21 -05:00
Vincent St-Amour
f420edc5ee Add range to racket/list. 2012-02-27 13:40:31 -05:00
Kevin Tew
3e0e4a3f6b Allow hashes across place channels. 2012-02-27 10:11:04 -07:00
Matthew Flatt
188c6fdc66 add `log-max-level'
As suggested by Tobias Hammer
2012-02-26 22:13:02 -05:00
Matthew Flatt
2d7b97ece9 doc and terminology fix 2012-02-26 22:13:02 -05:00
David Van Horn
f029117266 Fixes spelling errors in reference. 2012-02-21 14:21:43 -05:00
Matthew Flatt
a79080e7ed improve docs to match improved "-h" output 2012-02-20 08:09:06 -07:00
Robby Findler
b2a3b3a8a2 add xor, adjust implies following Carl's comments 2012-02-20 06:25:37 -06:00
Robby Findler
d4b176dd41 clarify nor docs 2012-02-19 15:17:29 -06:00
Robby Findler
4b2f78477a added nand, nor, and implies to racket/bool 2012-02-19 08:05:11 -06:00
Robby Findler
190d011f0d clarify boolean=? and symbol=? 2012-02-19 08:05:10 -06:00
Matthew Flatt
2c479683d1 add --launcher'/-l' flag to `raco exe' to create launchers
This addition triggered several other changes:

 * -k for a Mac OS X embedding is now relative to the __PLTSCHEME
   segment (which means that executables won't break if you strip
   them, for example)

 * the command-line no longer has a limited size for Mac OS X
   launchers and embedding executables

 * Mac OS X GUI and Windows launchers record the creation-time
   collection path, unless they are created as "relative" launchers
2012-02-13 16:27:51 -07:00
James Swaine
46c981bcdf Clarified futures-enabled? documentation 2012-02-12 20:42:05 -06:00
James Swaine
fd7235f94a Updated future-event docs 2012-02-12 02:05:36 -06:00
James Swaine
7114f08c0b Added tests for would-be-future
Minor fixes to would-be-future
Added futures-enabled? primitive
Added primitive name to future-event struct
2012-02-12 01:32:30 -06:00
James Swaine
a5676e9a68 Added would-be-future 2012-02-10 20:05:43 -06:00
Matthew Flatt
937cdf51d7 change `current-write-relative-directory' to support more path conversions
In particular, allow a pair of a relative-to directory and a base
directory. Paths that syntactically extend the base directory are
recorded as relative to the relative-to directory (which must
syntactically extend the base directory).

The compilation manager now sets the parameter to a pair with
the base directory as the main collection directory, if the source
file's path extends that directory's path.

This generalization solves problems created by cross-module inlining,
where the source location of a procedure in bytecode can now be in a
different file than the enclosing module's file.

Also add a test that checks whether the build directory shows up
in any ".zo", ".dep", or documentation ".html" files.

Closes PR 12549
2012-02-10 06:17:18 -07:00
Asumu Takikawa
5a27a8538c Add documentation for #:opaque keyword. 2012-02-08 22:47:16 -05:00
Kevin Tew
4f3bec1792 pr# 12542 fixed - All symbol types are now allowed across place channels. 2012-02-08 10:21:59 -07:00
Rodolfo Henrique Carvalho
c3f92c26b9 Update collects/scribblings/reference/stx-trans.scrbl 2012-02-02 12:46:01 -05:00
Matthew Flatt
a3ce8bf787 doc behavior of `copy-file' and modification dates on Windows 2012-01-31 07:14:25 -07:00
Matthew Flatt
6b6beb601e add PLT_VALIDATE_COMPILE to enable extra checking of the compiler
Setting the environment variable causes the bytecode compiler to run
the bytecode validator (which is normally applied to input from a
bytecode file) immediately on all of the compiler's own results.
2012-01-30 10:31:37 -07:00
Matthew Flatt
3bed8aee43 fix docs for `syntax-id-rules'
Closes PR 12519
2012-01-29 06:50:35 -07:00
Matthew Flatt
ab9607b35a adjust a doc correction 2012-01-26 09:30:25 -05:00
Rodolfo Henrique Carvalho
7d97cbecb4 Update collects/scribblings/reference/filesystem.scrbl 2012-01-25 08:48:56 -05:00
Matthew Flatt
eb0cbcb3c4 sort out for-require' vs. for-load' paths to a sandbox evaluator
The two became tangled in commit f7c16fc8, and then 952ae06105
adjusted the tangling in a way that broke code. This commit
further adjusts tangling in a way that hopefully causes fewer
compatibility problems, but it also splits inputs to
`make-evaluator' so that a programmer can choose more explicitly.
2012-01-19 13:14:02 -07:00
Eli Barzilay
e8356b3b91 Tiny typo. 2012-01-15 20:48:10 -05:00
Matthew Flatt
96dea8c732 fix typo (patch from Gustavo Massaccesi)
Closes PR 12489

Merge to 5.2.1
2012-01-15 17:05:11 -07:00
Matthew Flatt
23010fc495 add #:fail' option to collection-file-path' and `collection-path'
Merge a variant to 5.2.1
2012-01-09 15:59:05 -07:00
Matthew Flatt
2ebff14e3e fix typo 2011-12-31 06:32:13 -07:00
Ryan Culpepper
933965b2c2 moved unstable/prop-contract into racket/contract/base 2011-12-18 13:57:50 -07:00
Matthew Flatt
6bae0fc036 clarify `letrec' spec 2011-12-18 07:27:32 -07:00
Matthew Flatt
ee775c3cc3 intern strings, etc. only when making syntax objects, not in `read'
Rename `read-intern-literal' to `datum-intern-literal'.

Interning is needed only in `read-syntax' or `datum->syntax' to
set up the invariants that the bytecode compiler needs for cross-module
optimization. When `read'ing numbers from a data file, meanwhile,
interning slows things down a lot and doesn't seem worthwhile.
2011-12-14 16:03:44 -07:00
Matthew Flatt
287d5cedf5 add `pseudo-random-generator-vector?'
Also, adjust docs to clarify that `vector->pseudo-random-generator!'
can be used as a more complete seeding function.
2011-12-09 09:12:17 -07:00
Matthew Flatt
657be87c66 generalize gcd' and lcm' to work on rationals 2011-12-08 09:25:39 -07:00
Matthew Flatt
7e666b4b45 add stream' to racket/stream'
based on a pull request from Dan King
2011-12-08 09:25:34 -07:00
Matthew Flatt
545b37ff0d add racket/performance-hint' with begin-encourage-inline' 2011-12-01 10:26:48 -07:00
Matthew Flatt
1bc2441b5a switch to syntax property for 'compiler-hint:cross-module-inline 2011-12-01 10:26:48 -07:00
Kevin Tew
958ad908ab place scrbl fix 2011-12-01 09:54:38 -07:00
Matthew Flatt
cb341e1f48 make in-sequences' and in-cycle' accept 0 sequences
Plus doc clarifications.
2011-11-28 13:51:24 -07:00
Matthew Flatt
27db62c9c8 typo
Closes PR 10822
2011-11-27 18:40:18 -07:00
Matthew Flatt
5858585085 doc clarification
Closes PR 8460
2011-11-27 18:13:45 -07:00
Matthew Flatt
2b658fb1d4 doc clarification
Closes PR 8559
2011-11-27 18:02:26 -07:00
Matthew Flatt
a04272d245 fix typo and text duplication 2011-11-27 13:27:04 -07:00
Matthew Flatt
cba6323e8c doc correction
Closes PR 11959
2011-11-27 11:50:22 -07:00
Matthew Flatt
b157ff2399 fix `#lang at-exp' spec and related
Closes PR 12174
2011-11-27 11:22:41 -07:00
Matthew Flatt
e7ab46d505 doc repair
Closes PR 12281
2011-11-26 17:09:24 -07:00
Matthew Flatt
7adc61060d doc repair
Closes PR 12289
2011-11-26 17:09:24 -07:00
Matthew Flatt
1175964a78 reference clarifications on string ports
Closes PR 12365
2011-11-26 17:09:23 -07:00
Matthew Flatt
1ac7e7e19d racket/class: add `dynamic-send' 2011-11-25 13:22:05 -07:00
Matthew Flatt
d421ed1bb6 racket/class: add `send/keyword-apply' 2011-11-25 13:19:42 -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
Matthew Flatt
e44bd3f79d intern literal strings, byte strings, regexps, characters, and numbers 2011-11-22 08:54:37 -07:00
Asumu Takikawa
283d91be7d Fix typos in reference. 2011-11-16 02:09:05 -05:00
Matthew Flatt
3bffcae3c2 fix places & executable interaction
Added `module-predefined?' and changed `racket -k ...'
2011-11-15 18:42:21 -07:00
Sam Tobin-Hochstadt
591dcc4a27 Add prop:match-expander' and prop:legacy-match-expander'. 2011-11-14 11:03:22 -05:00
Sam Tobin-Hochstadt
81dd112f57 Move ==' to racket/match'. 2011-11-14 11:03:22 -05: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
Matthew Flatt
5139de9cec add `port-closed-evt' 2011-11-10 10:01:57 -07:00
Danny Yoo
899bc0616b Adding an example for `define-match-expander'. 2011-11-04 11:16:35 -04:00
Robby Findler
d00aed6f1b fix the module reader for the case when there are non-ASCII unicode characters
in comments before the #lang line

also add an #:init-position argument to peeking-input-port
2011-11-03 17:13:17 -05:00
Eli Barzilay
90f7a98dd6 Fix the default `sandbox-make-code-inspector'.
It now creates an inspector based on the original code inspector instead
of the (implicit) wrong default used by `make-inspector'.  Change
`sandbox-make-inspector' too, to make it explicit.
2011-11-02 17:40:24 -04: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
Matthew Flatt
d4f7020cd2 add cross-reference between data and read/print descriptions
Closes PR 11096
2011-10-15 07:20:33 -07:00
Matthew Flatt
2a39a098a6 fix docs on reading characters
Closes PR 11102
2011-10-15 07:20:33 -07:00
Matthew Flatt
eba0ca2d4d add cross-ref from reference to guide on places 2011-10-15 07:20:33 -07:00
Matthew Flatt
e55e0a5e4a reader doc fixes
Closes PR 11086
2011-10-15 07:20:33 -07:00
Matthew Flatt
5c0956d7b1 more memory accounting fixes for places
Fix memory accounting to detect when messages pile up in a
place channel and when shared values (such as the result of
`make-shared-bytes') pile up. Also fix problems where a GC
or free-page purge needs to be triggered.

The implementation causes a minor API change, which is that
a place channel sent multiple times as a message generates
values that are `equal?' but no longer eq?'.

Closes PR 12273

[Do not merge to 5.2]
2011-10-11 11:26:11 -06:00