Commit Graph

1861 Commits

Author SHA1 Message Date
Matthew Flatt
2f7d4b5eaf change a thread's initial prompt to use the default handler
The thread's initial prompt previously ignored its arguments.
2012-09-05 12:21:43 -06:00
Matthew Flatt
3a7724e422 fix documentation of the prompt installed by `module' 2012-09-05 12:21:43 -06:00
Matthew Flatt
ba56fd72da racket/class: add dynamic-get-field' and dynamic-set-field!' 2012-09-04 15:28:18 -06:00
Matthew Flatt
69d2adce4d racket/gui: new-style error messages 2012-09-02 16:38:43 -06:00
Matthew Flatt
b4fea2ff36 fix `delay/thread' error when promise-running thread terminates 2012-08-29 09:32:54 -06:00
Matthew Flatt
b61f3f751c port position-tracking clean-ups
Add `file-position*', which can return #f instead of raising
an exception when a port's position is unknown. Change
`make-input-port' and `make-output-port' to accept more
kinds of values as the initial position.

These changes make it possible to synchronize a port's
position with a `port-commit-peeked' action. It's ugly,
which I think reflect something broken about position
tracking in the port protocol (which seems difficult to fix
without breaking compaibility).
2012-08-28 16:04:41 -06:00
Robby Findler
fc03ab6c69 add a mention of the flat/chaperone/impersonator contract hierarchy to the contract docs 2012-08-28 13:19:05 -05:00
Matthew Flatt
763882f651 add port shortcut for `make-{input,output}-port'
Providing a port instead of a reading or writing procedure
redirects the read/write to the specified port. This shortcut
is kind of a hack, but the run-time system can easily streamline
the redirection when it's exposed this way.

Using the new redirection feature reduces overhead in
`with-output-to-bytes' and `pretty-print'.
2012-08-28 08:54:26 -06:00
Matthew Flatt
fe1cc4f009 doc repair 2012-08-27 20:17:06 -06:00
Matthew Flatt
cb95a99d68 change `transplant-{input,output}-port' to propagate buffering
Affects derived functions, such as `dup-output-port' and
`relocate-output-port', and uses in `pretty-print'.
2012-08-27 19:44:06 -06:00
Matthew Flatt
23722e64c2 change `exn:break:hang-up' handling to skip display
Since SIGHUP normally means that the output has gone away,
don't try to write to it.

Closes PR 13058 (although it doesn't solve the more general
problem that is noted in the PR)
2012-08-24 15:48:58 -06:00
Robby Findler
e4450e2705 make record-disappeared-uses call syntax-local-introduce
on the identifiers passed to it
2012-08-24 09:34:41 -05:00
Robby Findler
1ad2c75531 add the ability to specify #:parent to struct/dc (and fix struct/c to use it)
closes PR 13049
2012-08-23 18:59:11 -05:00
Matthew Flatt
ef525233a2 references: link "A parameter that..." to the definition of "parameter" 2012-08-22 10:28:56 -06:00
Asumu Takikawa
46ece20b09 Fix typo introduced by 965a74453f
(Moral of story: be careful with regexps)
2012-08-21 16:35:37 -04:00
Asumu Takikawa
9a65f9aaf0 Delete trailing whitespace 2012-08-21 16:20:26 -04:00
Asumu Takikawa
965a74453f Add #:forall, #:∀ to contract-out 2012-08-21 16:20:26 -04:00
Asumu Takikawa
47cb06f842 Fix docs for reencode-input-port & reencode-output-port
Closes PR 10545
2012-08-18 00:34:54 -04:00
Asumu Takikawa
6665053dad Fix contracts on several I/O functions
Closes PR 12599
2012-08-18 00:22:21 -04:00
Matthew Flatt
902016265b docs for `for/vector': warn about intreaction with continuations 2012-08-16 13:11:42 -06:00
Matthew Flatt
6e2bb58cce add a #:fill' clause to for/vector' et al. 2012-08-15 09:32:55 -06:00
Matthew Flatt
23bca99ba1 adjust `local-expand' to add 'submodule property 2012-08-13 17:11:20 -06:00
Matthew Flatt
b043da6ea6 SIGHUP and SIGTERM -> exn:break:hang-up' and exn:break:terminate'
The default uncaught-exception handler calls `exit' when it receives
one of the new exceptions.
2012-08-13 17:11:20 -06:00
Matthew Flatt
d38fa91792 doc fix
Closes PR 13007
2012-08-12 20:17:29 -06:00
Matthew Flatt
7aec4f6c7e doc corrections
Number-grammar problems reported by Milo Arvidsson.
2012-08-11 06:42:24 -06:00
James Swaine
6271556e1d Add GC display to future visualizer 2012-08-11 01:00:51 -05:00
Vincent St-Amour
a190ecfb7b Fic generics docs.
Closes PR 12988.
2012-08-08 17:26:55 -04:00
Matthew Flatt
13d7a37eb6 re-align expt' and flexpt' to match C99 pow() spec
Also, improve precision of some complex results to avoid
excessive `+nan.0's.

Closes PR 12935
2012-08-06 13:00:36 -06:00
Eric Dobson
b95dba9f19 Fix documentation on integer-sqrt/remainder. Closes PR 12971 2012-08-06 12:31:07 -04:00
Robby Findler
8a0b6549a5 adjust the contract error messages to follow the error message
conventions in 9.2.1 of the reference (altho the messages do
not yet do the extra level of indenting when a field is too
long, nor are there any field names ending in ...)

Also, fix the docs for the #:stronger argument to
make-contract, make-chaperone-contract, and make-flat-contract
2012-08-05 20:09:09 -05:00
Matthew Flatt
7c9e6d7193 improve port progress-evt guarantees; fix for `read-bytes-evt' et al.
A progress evt from a close input port must be initially ready,
and the primitive `peek-bytes-avail!' checks a progress evt
before checking whether the port is closed.

These changes resolve a race in `read-bytes-evt' and related evt
constructors.
2012-08-04 10:19:55 -06:00
Vincent St-Amour
800a328fe6 Fix documentation for packages and mutable lists.
As suggested by Matthew.
2012-07-31 17:12:30 -04:00
Kevin Tew
6b48d34867 [Distributed Places] added #:thunk and #:named keyword arguments to distributed place creation functions 2012-07-31 11:51:55 -06:00
Ryan Culpepper
d19137c998 fix name of function in docs
Closes PR 12950
2012-07-28 16:41:08 -04:00
Vincent St-Amour
52439d528b Move mutable list functions to the compatibility collect.
Mutable pair functions from racket/base are not moved.
2012-07-27 16:49:05 -04:00
Vincent St-Amour
ab2226a19e Add a `compatibility' collect for compatibility with other languages.
It includes `defmacro' and Chez-style modules (packages).
2012-07-27 16:49:05 -04:00
Asumu Takikawa
2dcf060774 Move engines from mzlib/thread to racket/engine
(they were previously called "coroutines" but
 the term "engine" is less ambiguous)
2012-07-26 14:47:29 -04:00
Matthew Flatt
4c3dd00d49 fix `port-commit-peeked' and mid-stream EOFs 2012-07-26 06:14:35 -06:00
Matthew Flatt
11be722a0f typo 2012-07-25 21:58:18 -06:00
Matthew Flatt
d1048406b5 typo 2012-07-25 21:32:33 -06:00
Matthew Flatt
7d894bfb63 Note require' of a main' submodule for -t', -l', and `-p'
In the output of `racket -h' and in the command-line docs.

Merge to v5.3
2012-07-25 20:07:23 -06:00
Asumu Takikawa
ea1636d4f1 Doc fixes reported by Gary Baumgartner
The typo on 'redex.racket-lang.org' still remains.

Relevant to PR 12680

Merge to v5.3
2012-07-23 13:10:05 -04:00
James Swaine
f0aaca0dde Change future visualizer trace collection slightly to be more composable 2012-07-22 20:03:22 -05:00
James Swaine
df54f8460b Fix future visualizer trace collection when running inside DrRacket 2012-07-22 20:03:21 -05:00
Eli Barzilay
476c270a66 Use a new evaluaor in "for.scrbl", have it require `racket/base' for syntax.
Also explicitly close the evaluator used in "block.scrbl".

Closes PR 12931.
2012-07-22 13:38:38 -04:00
Eli Barzilay
18883681a2 Convert all uses of (integer-in 0 255) to `byte?'. 2012-07-22 13:00:05 -04:00
Eli Barzilay
a6b20f01da Use string-no-nuls?' and bytes-no-nuls?' in more docs & error messages.
Also use `byte?' instead of (integer-in 0 255).

(This commit will most likely require some proof-reading.)
2012-07-22 13:00:05 -04:00
Eli Barzilay
c2fe7c4e35 Quick typo fix. 2012-07-22 10:11:37 -04:00
Asumu Takikawa
3582b57bcc Move mzlib/defmacro => racket/defmacro
With both @bold and @italics warning against its use.
No @blink though.
2012-07-20 16:00:47 -04:00
Matthias Felleisen
6768136144 docs for revised system error message completed 2012-07-20 12:30:30 -04:00
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