Commit Graph

1909 Commits

Author SHA1 Message Date
Eric Dobson
ac8fd2cd38 Fix doc typo. 2013-05-27 17:39:58 -07:00
Robby Findler
429000fe3b minor clarification to class/c contract spec 2013-05-26 14:34:50 -05:00
Asumu Takikawa
eb82c717ba Fix minor doc typo for threads 2013-05-23 09:11:48 -04:00
Asumu Takikawa
3f0704dcac Fix alarm-evt doc typo 2013-05-21 18:34:05 -04:00
Asumu Takikawa
4a3b8cdfc4 Add examples for for/lists 2013-05-17 00:21:54 -04:00
Asumu Takikawa
3651974c6e Add more syntax examples to the reference 2013-05-14 15:25:43 -04:00
Eli Barzilay
c228b13f9f Make the stop value for `in-producer' optional.
There are many cases where you just want to use some other tool like
`#:break' to stop the iteration, so no need to make up a bogus stop
value and no need to spend time checking it.
2013-05-09 11:11:06 -04:00
Eli Barzilay
c34129928e Add permutations' and in-permutations'. 2013-05-09 10:20:36 -04:00
Eli Barzilay
34fe42d0dd Some style cleanups.
Mainly reogranize the code + exports + docs of the additional list
convenience functions.

Also, add a custom printer to a "running" struct in
`racket/private/promise', so there's a sensible output if the value
happens to leak outside of a promise (eg, when debugging).
2013-05-09 10:20:36 -04:00
Matthew Flatt
eb46eacad9 raco exe: enable on-demand parsing of embedded bytecode
Creating a stand-alone executable could slow down a program,
because bytecode embedded in an executable was not treated
in the same way as bytecode loaded from files. The difference
was in on-demand parsing of bytecode --- and now it's enabled
for embedded bytecode, too.
2013-05-08 12:31:34 -04:00
Matthew Flatt
53efe920b3 Move explode-path' from racket/path' to `racket/base'
The revised `explode-path' runs in time proportional to the
length of the path, instead of quadratic in the number of
path elements. The difference doesn't matter much in my
program, but I'm reluctant to leaving the implementation
as quadratic (which is forced by using `split-path').
2013-05-08 09:54:30 -04:00
Asumu Takikawa
eaf9521336 Add a few examples to syntax transformer section 2013-05-07 21:39:11 -04:00
Matthew Flatt
7339074741 racket/place: keywords as place messages 2013-05-07 14:48:21 -04:00
Matthew Flatt
0b1c0ba13b racket/{require,provide}-syntax: add `syntax-local-{require,provide}-introduce' 2013-05-07 14:48:21 -04:00
Matthew Flatt
376dd5f4aa add `racket/rerequire'
The `dynamic-rerequire' function is the reloading support of
`enter!', but in function form and without namespace-switching.
2013-05-07 12:00:13 -04:00
Matthew Flatt
169e801803 switch rascket/base' and scheme/base' to submodule language style
The `#%module-begin' of `racket/base' and `scheme/base' now introduces
a suitable `configure-runtime' submodule, instead of using the
`module->language-info' path.

A submodule is a lot easier to work with, as illustrated by the
removal of the `racket/private/lang' and `scheme/private/lang'
languages.

Also, add `#%printing-module-begin', which is the old `#%module-begin'
(i.e., the one that doesn't introduce a `configure-runtime' submodule).
2013-05-07 08:31:16 -04:00
Matthew Flatt
27f1b39294 add `configure-runtime' submodule support
A language can now introduce a `configure-runtime' submodule that
is `dynamic-require'd before the enclosing module.

This new submodule protocol provides a more general and
easier-to-understand way of configuring the run-time environment for
a module's language, as compared to the `module->language-info'
path (through a `get-info' function, via a 'configure-runtime value,
and finally loading the specified module).

The `module->language-info' path remains in place, and it is
checked after a `configure-runtime' submodule is run, since
that order is likely to be the most backward compatible.
2013-05-07 08:31:16 -04:00
Robby Findler
2648542a6c allow #:chaperone specification in struct/dc
related to PR 13734
2013-05-06 18:17:43 -05:00
Robby Findler
23d2e5cf83 another edito
closes PR 13734
2013-05-06 14:54:50 -05:00
Robby Findler
65b7d7855c edito 2013-05-06 14:44:42 -05:00
Robby Findler
a849733b8a add more explaination to #%expression 2013-05-06 08:35:18 -05:00
Robby Findler
ad8b5c5eb7 minor clarification of properties and datum->syntax 2013-05-04 10:32:22 -05:00
Matthew Flatt
ae570e843e reference: expand notation section
Also, move it after the language-model section.
2013-05-01 20:41:39 -06:00
Matthew Flatt
d4c63af3d6 use new `defmodule' in the Reference notation section 2013-04-30 09:36:48 -06:00
Asumu Takikawa
86b0595795 Fix Reference typos 2013-04-29 01:06:17 -04:00
Robby Findler
3dbc3060f6 minor field contract clarifications 2013-04-28 18:19:42 -05:00
Matthew Flatt
0754f79d61 adjust the new "notation" section of the reference 2013-04-28 15:26:36 -06:00
Robby Findler
07fd08ecc3 break some lines in recent commit to make things fit better in the rendered version 2013-04-27 19:17:35 -05:00
Robby Findler
67d6e41b25 add some examples to the class/c contract docs
and fix some commas
2013-04-27 19:10:39 -05:00
Matthew Flatt
d977a2c65d update kernel parameter checks to new error-message format 2013-04-25 16:46:23 -06:00
Stephen Chang
1a149eefbd typo in docs: reference: internal definitions 2013-04-25 15:34:37 -04:00
Asumu Takikawa
a15fa5badd Start on a notation section for the Reference 2013-04-25 14:54:29 -04:00
Matthew Flatt
426a8c0d39 add `exn:fail:{filesystem,syntax}:missing-module'
These exception types are intended as a hook for a programming
environment to recommend packages that can provide a module that isn't
found (through an uncaught-exception handler). The new exceptions are
generated by the default module name resolver and defaultload
handler. In addition to the exceptions, there's a new
`prop:exn:missing-module' property and `exn:missing-module?', which is
what an environment should use to detect relevant exceptions.

There's also a new `current-module-path-for-load' parameter, which
just provides a commuincation path from the module name resolver to
the the load handler. The parameter is a relatively ugly piece of the
puzzle, but it's the best I could find to squash the new functionality
into the existing stack of handlers.
2013-04-22 10:27:02 -06:00
Matthew Flatt
5c4a7db828 scribble/manual: add #:link-target?' to defproc', `defform', etc.
Specifying `#:link-target? #f' gets blue-box typesetting without
declaring documentaton for a binding.
2013-04-21 09:49:14 -06:00
Asumu Takikawa
a9286ce726 Fix doc contracts 2013-04-20 23:17:59 -04:00
Matthew Flatt
e29878e7ae racket/system: make `system', etc., set PWD by default
That is, make `system' behave like a shell.
2013-04-18 07:02:05 -06:00
Matthew Flatt
4cc29194d1 Unix: initialize `current-directory' from the PWD environment variables
... when PWD is defined and when it refers to the same directory
as the result of getcwd().

A shell sets PWD before starting Racket to communicate a preferred
way of referring to the current directory, which may involve soft
links that are not reflected in getpwd().
2013-04-18 06:37:53 -06:00
Robby Findler
7ea6a430f1 change promise/c docs to use defproc instead of defform
also fix a few "listof/c"s

closes PR 13694
2013-04-13 19:12:51 -05:00
Stevie Strickland
eb12d76769 Add two spaces before contract error message fields (Reference section 9.2.1). 2013-04-13 17:31:39 -04:00
Matthew Flatt
06c42f0887 equality for `define-cstruct'-generated wrappers
Closes PR 13650

Merge to v5.3.4
2013-04-11 14:48:26 -06:00
Matthew Flatt
a9a20e9aa7 fix the name of `environment-variables-ref'
Also, fix use of unsetenv() to work with platforms where it returns
void.
2013-04-11 06:42:54 -06:00
Matthew Flatt
6ea9a2b3e3 add `make-environment-variables'
Swap order of argument for `environment-variables-get'
and `environment-variables-set!', so that the environment
variables come first --- which follows the usual order.
This change means that the parameter isn't used to get
the default environment variables, but that seems ok; the
convenient interface is `getenv' and `putenv'.

On Windows, case-normalized environment variable names.

Also, change the implementation to use an immutable hash
internally.
2013-04-10 12:06:29 -06:00
Asumu Takikawa
3946d7ff78 Fix environment variable doc typos 2013-04-10 12:50:46 -04:00
Matthew Flatt
7c0f35e138 reference: simplify some contractcs 2013-04-10 08:29:42 -06:00
Matthew Flatt
d5f32b649c racket/sandbox: add sandbox-make-environment-variables
By default, a sandbox gets a fresh environment variable set,
which means that it does not affect environment variables
outside the sandbox (which means that sandboxed code cannot
set the Racket process's OS-level environment variables).

Closes PR 13667
2013-04-10 06:59:33 -06:00
Matthew Flatt
3d1b0bd381 new environment-variable API
The `current-environment-variables' parameter determines the current
mutable "environment variable set". If that set is the initial one for
a Racket process, then using the set corresponds to working with OS
environment variables.  Otherwise, it's really just a hash table that
is packaged up as OS environment variables if a subprocess is created.

The new environment-variable interface works in terms of bytes, instead
of assuming that environment variable names and values fit in a string
encoding.

The string-based `getenv' and `putenv' are still available as
convenience wrappers. The checking on environment-variable names
for those wrappers is a little tighter, preventing any attempt to use a
name that contains "=".
2013-04-10 06:59:33 -06:00
Danny Yoo
075212d07c Correct typo. 2013-04-09 15:49:11 -06:00
Robby Findler
b721565488 add #:error-name argument to opt/c
this makes it easier to stick opt/c implicitly into
various other contract using forms
2013-04-09 09:41:54 -05:00
Robby Findler
8231db1961 fix non-terminal reference 2013-04-06 19:04:04 -05:00
Matthew Flatt
b82cadaf99 reference: fix grammar for cross-phase expressions 2013-04-06 07:42:59 -06:00