Commit Graph

550 Commits

Author SHA1 Message Date
Robby Findler
85c781452d wording tweaks 2015-12-30 17:57:36 -06:00
Benjamin Greenman
0f7a946dba put contract-property accessors in an itemlist 2015-12-30 17:52:33 -06:00
Benjamin Greenman
61e21dba22 typo: is-flat-contract? -> is-list-contract? 2015-12-30 17:52:26 -06:00
Robby Findler
b3d05de304 improvements to set/c
- use chaperone-hash-set for set/c when the contract allows only hash-sets

- add a #:lazy flag to allow explicit choice of when to use laziness
  (but have a backwards-compatible default that, roughly, eschews laziness
   only when the resulting contract would be flat)
2015-12-27 22:56:04 -06:00
Robby Findler
bc12019af4 allow the interposition procedures to all be #f in chaperone-hash-set and impersonate-hash-set 2015-12-27 21:02:20 -06:00
Robby Findler
daf19869de chaperone-hash-set fixes 2015-12-26 22:09:14 -06:00
Robby Findler
1b6705f3d9 typo 2015-12-26 17:01:22 -06:00
Robby Findler
d927d04efd generalize tail contract checking for function contracts
Specifically, remove reliance on procedure-closure-contents-eq? to
tell when a pending check is stronger in favor of usint
contract-stronger?

Also, tighten up the specification of contract-stronger? to require
that any contract is stronger than itself

With this commit, this program gets about 10% slower:

  #lang racket/base
  (require racket/contract/base)
  (define f
    (contract
     (-> any/c integer?)
     (λ (x) (if (zero? x)
                0
                (f (- x 1))))
     'pos 'neg))
  (time (f 2000000))

becuase the checking is doing work more explicitly now but because the
checking in more general, it identifies the redundant checking in this
program

  #lang racket/base
  (require racket/contract/base)
  (define f
    (contract
     (-> any/c integer?)
     (contract
      (-> any/c integer?)
      (λ (x) (if (zero? x)
                 0
                 (f (- x 1))))
      'pos 'neg)
     'pos 'neg))
  (time (f 200000))

which makes it run about 13x faster than it did before

I'm not sure if this is a win overall, since the checking can be more
significant in the case of "near misses". For example, with this
program, where neither the new nor the old checking detects the
redundancy is about 40% slower after this commit than it was before:

  #lang racket/base
  (require racket/contract/base)
  (define f
    (contract
     (-> any/c (<=/c 0))
     (contract
      (-> any/c (>=/c 0))
      (λ (x) (if (zero? x)
                 0
                 (f (- x 1))))
      'pos 'neg)
     'pos 'neg))

  (time (f 50000))

(The redundancy isn't detected here because the contract system only
looks at the first pending contract check.)

Overall, despite the fact that it slows down some programs and speeds
up others, my main thought is that it is worth doing because it
eliminates a (painful) reliance on procedure-closure-contents-eq? that
inhibits other approaches to optimizing these contracts we might try.
2015-12-25 22:58:56 -06:00
Robby Findler
f0f85549ce add impersonate-hash-set and chaperone-hash-set 2015-12-25 22:58:55 -06:00
Robby Findler
c9d192f09b make more explicit that define-custom-set-types produces hash sets. 2015-12-25 22:58:55 -06:00
Matthew Flatt
db0a6de1d2 add procedure-specialize
The `procedure-specialize` function is the identity function, but it
provides a hint to the JIT to compile the body of a closure
specifically for the values in the closure (as opposed to compiling
the body generically for all closure instances).

This hint is useful to the contract system, where a predicate
is coerced to a projection with

 (lambda (p?)
   (procedure-specialize
    (lambda (v)
      (if (p? v)
          v
          ....))))

Specializing the projection to a given `p?` allows primitive
predicates to be JIT-inlined in the projection's body.
2015-12-23 17:46:56 -07:00
Robby Findler
8a9408306b have a better strategy for or/c to determine which clause to commit to
in particular, when there is a recursive contract, then we check only
some part of the first-order checks and see if that was enough to
distinguish the branches. if it was, we don't continue and otherwise we do
2015-12-22 16:02:44 -06:00
Matthew Flatt
c01ced6e1d add syntax-transforming-with-lifts? 2015-12-22 08:02:44 -07:00
Matthew Flatt
0553f191d7 adjust PLT_INCREMENTAL_GC so it can disable generational GC
A value that starts "1", "y", or "Y" enabled incremental mode
permanently (any value was allowed formerly), while a value that
starts "0", "n", or "N" causes incremental-mode requests to be
ignored.
2015-12-20 08:58:21 -07:00
Matthew Flatt
513849c1e3 incremental GC: make accounting incremental for the root custodian 2015-12-20 08:58:21 -07:00
Robby Findler
783443f9d7 update the docs for ->i
(should have been in commit 506c9be0cd)
2015-12-19 22:17:59 -06:00
Jay McCarthy
2e34599ce3 Support custom categories on root documentation page
When custom categories are used in older versions, raco setup will
report a warning, but the documentation will still appear under the
Miscellaneous section. Thus, this is a backwards compatible
implementation of the idea.
2015-12-19 16:56:48 -05:00
Robby Findler
33ba7683b2 specify default for stronger 2015-12-15 21:54:36 -06:00
Matthew Flatt
ca237910b3 fix make-syntax-delta-introducer with a #f argument
Closes PR 15202
2015-12-15 17:11:45 -07:00
Matthew Flatt
11f76cbebf fix Burroughs's name 2015-12-15 17:11:45 -07:00
Robby Findler
bd77a0102c add blame-missing-party? and document it and blame-add-missing-party 2015-12-14 12:53:35 -06:00
Matthew Flatt
4354ce45d8 use `scribble/examples' for the Reference
Port `examples`, `interactions`, etc., to use the new `examples`
form of `scribble/examples`. The main intended effect is to ensure
that errors are produced by examples only as specifically
indicated.
2015-12-11 12:29:41 -07:00
Robby Findler
3d7d906cc1 tweak and clean up the contract combinators api
- uniformly remove the extra layers of calls to unknown functions for
  chapereone-of?  checks that make sure that chaperone contracts are
  well-behaved (put those checks only in contracts that are created
  outside racket/contract)

- clean up and simplify how missing projection functions are created
  (val-first vs late-neg vs the regular ones)

- add some logging to more accurately tell when late-neg projections
  aren't being used

- port the contract combinator that ->m uses to use late-neg

- port the </c combinator to use late-neg
2015-12-09 21:55:58 -06:00
Michael Campagnaro
4d7e90286e Fix typo in 'more: systems' doc 2015-12-07 10:42:13 -06:00
Sam Tobin-Hochstadt
21316e3ebf Don't copy immutable vectors in vectorof if not needed.
This happens only if the element contract is a flat contract.
2015-12-06 10:45:13 -05:00
Matthew Flatt
fef695f066 fix call-with-atomic-output-file for pathless filename
Closes #1156
2015-12-03 08:05:17 -07:00
Matthew Flatt
345b1a8187 refine the Guide section in incremental GC 2015-12-01 17:47:29 -07:00
Phil Nguyen
734563a7f4 remove duplicate examples in doc for arity=? and arity-includes? 2015-11-30 10:40:06 -06:00
Matthew Flatt
a389678556 improve interaction of incremental mode and finalization
Really, just improve when majors GCs are forced to trigger
further finalizations. This improvement makes `(collect-garbage)`
followed by `(collect-garbage 'incremental)` move more
reliably into incremental mode.
2015-11-28 15:54:45 -07:00
Matthew Flatt
c9e9b4e400 add info on incremental GC mode to the Guide 2015-11-28 11:55:43 -07:00
Matthew Flatt
ba8103bbde add PLT_INCREMENTAL_GC
Although calling `(collect-garbage 'incremental)` in a program with
a periodic task is the best way to request incremental collection, it's
handy for some experiments to have an environment variable that turns
it on permanently.

This change also makes incremental-mode minor collections log as "mIn"
instead of "min", and it changes the first field of the logged
`gc-info` structure to be a mode symbol instead of a boolean.
2015-11-27 08:02:18 -07:00
Ambrose Bonnaire-Sergeant
37c2558475 Fix documentation typo 2015-11-26 08:26:33 -06:00
Robby Findler
fcfa969b4a add some examples to impersonate-procedure 2015-11-23 09:02:41 -06:00
Jay McCarthy
ad53983276 fix history annotations 2015-11-23 08:41:13 -05:00
zsh_89
5691b5a344 Add a link to a Macro tutorial written by Greg Hendershott which helps new learners understand Racket macro better. 2015-11-22 06:51:14 -07:00
Matthew Flatt
8e46e46d40 add more support for continuation marks in procedure impersonators
Allow a more dynamic (than `impersonator-prop:application-mark`)
determination of continuation marks and associated values to wrap the
call of an impersonated procedure.
2015-11-20 10:20:02 -07:00
Jay McCarthy
551e4d5a0d Adding documentation for new parameters and updating inside/params with other defs near my changes 2015-11-20 10:17:36 -05:00
Matthew Flatt
0e16ce4bea add internal-definition-context-{binding-identifier,track}
When an internal-definition context is used with `local-expand`, the
any binding added to the context affect expansion, but the binding do
not appear in the expansion. As a result, Check Syntax was unable to
draw an arrow from the `s` use to its binding in

 (class object%
   (define-struct s ())
   s)

The general solution is to add the internal-definition context's
bindings to the expansion as a 'disappeared-bindings property. The new
`internal-definitionc-context-track` function does that using a new
`internal-definition-context-binding-identifier` primitive.
2015-11-15 06:17:22 -07:00
Matthew Flatt
fb1432e70e declare and document scheme_set_dll_path() for Windows embedding 2015-11-13 06:49:07 -07:00
Robby Findler
023e2de5be Go back to using the nicer unicode picture of the directory
now that Matthew added support for those characters to Scribble

This reverts commit db464d5ed2.
This reverts commit dd5029947c.
2015-11-08 19:43:02 -06:00
Robby Findler
a8f748abeb clarify some invariants of make-contract and friends 2015-11-08 15:41:03 -06:00
Robby Findler
db464d5ed2 make a little more space and stop decoding
(improvements to dd50299)
2015-11-08 07:57:04 -06:00
Robby Findler
dd5029947c use latex-friendly characters 2015-11-08 06:42:01 -06:00
Robby Findler
71690384a4 add first-or/c 2015-11-07 19:55:20 -06:00
Stephen Chang
83c4a2a19c typo in doc for make-syntax-delta-introducer
I'm not sure about the _m-id_ part but I think this is what the docs are trying to say.
2015-11-07 08:57:32 -07:00
Matthew Flatt
b5224743b8 refine in-directory example
Extend Juan's nice example to show simpler modes, too.
2015-11-07 08:56:05 -07:00
Juan M Uys
348cd7976f provide example for in-directory 2015-11-07 08:40:45 -07:00
Phil Nguyen
66f89cb6f6 fix documented contract ranges of set-subtract! and set-symmetric-difference! 2015-11-07 08:39:48 -07:00
Sam Tobin-Hochstadt
f126fd2356 Revert "change or/c so that it takes the first ho projection"
This reverts commit 5a33856802.

Merge to 6.3.
2015-11-06 14:25:41 -05:00
Juan Francisco Cantero Hurtado
5e2421b1a0 Doc: github.com/plt -> github.com/racket 2015-11-06 10:26:07 -06:00
Matthew Flatt
585f14744e ffi/unsafe/com: repair for safe arrays, and add com-omit?
Repair provided by Antonio Menezes Leitao.
2015-11-04 16:51:09 -07:00
Phil Nguyen
42e5d9f5cf fix typo in documented contracts for extfl->exact and extfl->inexact 2015-11-04 13:30:56 -06:00
Matthew Flatt
5a8d2e4204 fix bugs in the reader, especially related to readtables
Closes #1118, but improved testing exposed many other bugs.
2015-11-04 08:51:03 -07:00
Matthew Flatt
0edd781928 use "_LOCK" prefix for Windows cross-build
Use "_LOCK" instead of ".LOCK" when the cross
platform is Windows, not just when the current
platform is Windows.

Merge to v6.3
2015-10-28 17:44:26 -04:00
Spencer Florence
8f681cec7a fixed minor docs typo 2015-10-28 09:18:05 -04:00
Stephen Chang
c868c7b68d doc typos 2015-10-27 16:11:15 -04:00
Alex Knauth
67e3899272 Allow separate read and write contracts for box/c 2015-10-24 14:16:49 -05:00
Matthew Flatt
2e3ff0332d improve docs on make-weak-hash
Note that values are held normally and ephemerons can help.
2015-10-22 09:40:37 -06:00
Matthew Flatt
62f089756c fix doc typo 2015-10-21 15:16:56 -06:00
Matthew Flatt
ea6cef5246 Windows: make scheme_register_tls_space() always available
To make the API consistent for MSVC versus MinGW builds, make
a functional formerly required for embedding on 32-bit Windows
always available and required for all Windows variants.
2015-10-20 20:22:22 -06:00
Phil Nguyen
056ec806d5 fix ranges of set-union!, set-intersect!, dict-clear! to be void? in doc 2015-10-19 08:08:22 -06:00
Matthew Flatt
c50c23c134 GC: toward incremental collection
Make the old-generation marking process incremental
on request, where `(collect-garbage 'incremental)`
makes a request.

Only the marking phase of an old-generation collection
is incremental, so far. In exchange for slower
minor collections and a larger heap, you get a major
collection pause time that is roughly halved. So, this
is a step forward, but not good enough for most purposes
that need incremental collection.

An incremental-mode request sticks until the next
major GC. The idea is that any program that could
benefit from incremental collection will have
some sort of periodic task where it can naturally
request incremental mode. (In particular, that
request belongs in the program, not in some external
flag to the runtime system.) Otherwise, the
system should revert to non-incremental mode, given
that incremental mode is slower overall and can
use much more memory --- usually within a factor of
two, but the factor can be much worse due to
fragmentation.
2015-10-16 21:08:23 -06:00
Vincent St-Amour
9fe486b9e0 Add missing history annotations.
Please merge to 6.3.
2015-10-12 14:43:19 -05:00
Vincent St-Amour
270bbccf6b Fix history annotations to refer to 6.3.
Please merge to 6.3.
2015-10-12 13:49:55 -05:00
Matthew Flatt
6c0ffe1ba2 add missing history
Merge to v6.3
2015-10-11 07:44:55 -06:00
Paolo G. Giarrusso
a2b213ad1b Fix typos 2015-10-08 19:03:36 -06:00
Stefan
d988055a49 added crypto-random-bytes 2015-10-05 12:00:01 -06:00
Asumu Takikawa
a729c028a6 Add racket/os library.
For now this just contains two functions from mzlib/os.
2015-10-05 11:59:38 -06:00
Gustavo Massaccesi
09a2b630bc Generalize inferred names
After some expansions, a expression with the syntax property 'inferred-name of
'x is converted to one with ('x . 'x), so it's not useful to get the name of a
procedure. So we simplify the syntax property 'inferred-name to handle
these cases.
2015-10-05 10:25:57 -06:00
Robby Findler
2516374744 account for the added caveat line in the example error message dissection
Thanks to Paolo G. Giarrusso for spotting this and proposing a fix
2015-10-03 09:43:51 -05:00
Matthew Flatt
acac7092c5 doc tweak 2015-10-01 21:30:46 -06:00
Robby Findler
5a33856802 change or/c so that it takes the first ho projection
whose first-order predicate accepts a value, instead
of requiring that there be exactly one
2015-09-22 09:05:34 -05:00
Matthew Flatt
1a48418844 infrastructure for raco ctool --c-mods <dest> --runtime <dir>
Make the runtime-file gatherer, which is normally used by `raco exec`,
work also for modules prepared for an executable that embeds Racket.
2015-09-18 18:55:22 -06:00
Vincent St-Amour
4522d2167a Merge docs for new string functions. 2015-09-16 13:05:42 -05:00
ben
85e5db38fb renamed string-startswith/endswith to string-prefix/suffix 2015-09-16 13:05:40 -05:00
ben
22cda63200 add string-startswith? and string-endswith? 2015-09-16 10:33:53 -05:00
Matthew Flatt
3d69846046 GC: fuse mark and fixup passes, usually
In the common case of a minor GC without a generation 1/2
or a major GC without compaction, a single pass suffices
to both mark and update references.

This change reduces overall GC time by 10%-25% on typical
programs.
2015-09-15 15:16:11 -06:00
Vincent St-Amour
d1ad70b7a0 Remove mention of unstable. 2015-09-14 16:23:57 -05:00
Benjamin Greenman
dedde2cd60 typo: construct -> contract 2015-09-13 15:36:19 -05:00
Matthew Flatt
5401c5d179 racket/sandbox docs: clarify that collection modules are accessible 2015-09-12 13:21:04 -06:00
Matthew Flatt
81ee1b39c7 change the (relatively new) argument to collect-garbage
Make the argument a symbol, 'major or 'minor, instead
of a boolean, because that allows further extension.
2015-09-11 12:07:35 -06:00
Asumu Takikawa
4c2a32d293 Document inspector of #f for make-struct-type 2015-09-10 15:36:22 -04:00
Vincent St-Amour
965fa8e34c Start using failure-result/c in docs.
Not exhaustive, just what I could think of.
2015-09-08 17:11:26 -05:00
Vincent St-Amour
e358c49573 Add rename-contract, if/c and failure-result/c from unstable/contract. 2015-09-08 17:11:26 -05:00
Vincent St-Amour
147baa63f7 Add port-number? and listen-port-number? to racket/tcp.
From `unstable/contract`.
2015-09-08 17:11:26 -05:00
Vincent St-Amour
dc11eede98 Add links to docs. 2015-09-08 17:11:26 -05:00
Vincent St-Amour
5f43b3a913 Move non-empty-string? to racket/string.
From `unstable/contract`.
2015-09-08 17:11:26 -05:00
Asumu Takikawa
33bb5e9060 Make prop:rename-transformer accept a procedure
Allows the choice of target identifier to be delayed
until expansion time, rather than fixed at the point of
the transformer definition.
2015-09-08 13:29:13 -04:00
Vincent St-Amour
d705e928ac Add a mode argument to pretty-format.
... which controls whether it uses `print`, `write` or `display`.

Obsoletes most of `unstable/pretty`.
2015-09-07 15:46:58 -05:00
Matthew Flatt
3963f30070 document new configure-runtime behavior of raco test 2015-09-07 11:58:41 -06:00
Brian Lachance
e0f2d9c0d6 Fix make-contract example to show the correct contract violation
There was a duplicate quote around `given:' which caused a violation in
make-contract's internals.
2015-09-07 11:58:13 -05:00
Matthew Flatt
e1333d0616 fix compilation-top contract in docs
The associated change in the "zo-lib" package fixes #1038.
2015-09-07 08:28:52 -06:00
Matthew Flatt
c1ef6b999d fix documentation's contract for syntax-track-origin 2015-09-07 07:48:43 -06:00
Matthew Flatt
06841bbaff doc typo and clarification 2015-09-05 17:59:19 -06:00
Matthew Flatt
16c198805b prevent compile from binding in the current namespace
When `compile` is used on a top-level definition, do not
create a binding in the current namespace, but arrange for
a suitable binding to be in place for the target namespace.

Closes #1036
2015-09-05 10:58:44 -06:00
Matthew Flatt
24592f78fc ffi/unsafe/objc: add support for blocks
Also add some functions for manipualting classes and objects.
2015-09-04 08:31:52 -06:00
Matthew Flatt
efe056f18d update documentation for preserved syntax-object source locations 2015-09-02 18:21:38 -06:00
Matthew Flatt
929db29b67 add prop:expansion-contexts
The `prop:expansion-contexts` property can control the expansion
of a rename transformer in much the same that conditionals on
`(syntax-local-context)` can control the expansion of other
transformers.
2015-09-01 13:55:35 -06:00
Robby Findler
13964c4141 add and use late-neg projections to the contract system
These avoid one layer of currying and are more efficient, getting
about a 1.3x speed up on this program:

 #lang racket/base
(module server racket/base
  (require racket/contract/base)
  (provide
   (contract-out
    [f (-> integer? boolean? char? void?)]))
  (define (f i b c) (void)))

(require (submod "." server))

(time
  (for ([x (in-range 10000000)])
    (f 1 #t #\x)))
2015-08-31 20:48:03 -05:00
Matthew Flatt
0e4d9a68af fix executable creation for cross-installation 2015-08-29 20:54:27 -06:00
Matthew Flatt
29784bda8e add cross-system-type and cross-system-library-subpath
Adjust installation tools to support cross-installation (i.e.,
installation for a platform other than the current one) as triggered
by "system.rktd" in "lib" having different information than the
running Racket executable.
2015-08-27 12:01:31 -06:00
Matthew Flatt
3d452fdba6 raco exe: make Windows exes as proper PE32 images
Instead of simply tacking bytecode onto the end of an executable,
generate a proper PE32 image.
2015-08-24 17:12:11 -06:00
Matthew Flatt
96292cdf27 raco exe --ico: replace icon set wholesale
Use exactly the icons in the given icon file for the executable,
instead of coercing to the sizes and depths already in the executable.
2015-08-24 15:08:21 -06:00
Leif Andersen
c0dac75b7d Fix typo in zo structs documentation:
Which -> When
2015-08-24 12:19:57 -04:00
Matthew Flatt
66df8a2b9f document raco test conversion to get-module-suffixes 2015-08-22 09:48:46 -06:00
Matthew Flatt
a135c78baf add module-suffixes and doc-module-suffixes to "info.rkt"
A `module-suffixes` entry in a collection's "info.rkt" adds a
file suffix that is meant to be recognized globally (i.e., in
all collections) by all Racket tools.

The new fields are reported by `compiler/module-suffix` library, which
is (so far) used by `raco setup`.

Note that if package A includes files with a suffix that is registered
by package B, then A should have a dependency on B, but `raco setup`
cannot currently detect that such a dependency is needed. That
dependency is likely to happen, anyway, since package A is likely
using libraries form package B.
2015-08-22 09:36:19 -06:00
Matthew Flatt
f63220682b add support for compile-include-files as an "info.rkt" field
The `compile-include-files` entry lists additional files to be
compiled (when their extensions do not trigger compilation).
2015-08-22 07:41:49 -06:00
Vincent St-Amour
e5a024b02e Move struct->list docs from unstable docs. 2015-08-19 15:07:25 -05:00
Vincent St-Amour
13b6a98de6 Move docs for make-constructor-style-printer from unstable docs. 2015-08-19 15:07:25 -05:00
Matthew Flatt
80aac79507 change place to create a submodule
When `place` expands, the body of the `place` form is placed into a
`(module* place-body-<n> #f ....)` submodule.

The `place` form previously placed its body in a lifted function,
where the function's exported name was based on
`(current-inexact-milliseconds)`. The generated submodules have
deterministic names, so that compilation is deterministic, and
submodule names don't collide (unlike exported function names) when
multiple `place`-using module are imported into some other module.
Also, using a submodule avoids the problem that the clock doesn't
change fast enough on Windows.
2015-08-14 17:55:47 -06:00
Matthew Flatt
0caf079637 add syntax-local-lift-module 2015-08-14 16:52:56 -06:00
Matthew Flatt
cfa1d39166 add compiler/exe-dylib-path
Provide a clean interface to a private library for updating
dynamic-library paths in Mac executables.
2015-08-13 17:06:55 -06:00
Matthew Flatt
15eadbb868 copy-directory/files: add #:preserve-links? argument 2015-08-13 15:13:46 -06:00
Matthew Flatt
33cf716835 include phantom bytes consistently in memory-use reports 2015-08-13 15:13:46 -06:00
Vincent St-Amour
c50eeeecc9 Fix history annotations.
Version changed while the PR was up.
2015-08-13 14:43:57 -05:00
Vincent St-Amour
033d5afb19 Revert adding in-pairs to racket/sequence.
`in-dict` is more general, and `for` loops optimize it already.
2015-08-13 14:43:57 -05:00
Vincent St-Amour
52425fbb27 Add history notes. 2015-08-13 14:43:57 -05:00
Vincent St-Amour
63b1f0f4aa Improve docs for the new bits of racket/sequence. 2015-08-13 14:43:56 -05:00
Vincent St-Amour
f4f75f2740 Move docs for part of unstable/sequence to the racket/sequence docs. 2015-08-13 14:43:56 -05:00
Vincent St-Amour
2d23ca1414 Make doc section title more accurate. 2015-08-13 14:43:56 -05:00
Matthew Flatt
7741b4b361 local-expand: fix argument checking
Also, fix contract in the docs, since the first argument is allowed to
be an S-expression.
2015-08-13 11:48:20 -06:00
Matthew Flatt
86ee9c5071 signature-members: adjust element ids based on reference
Make the resulting content ids compatible with binding and reference
at a use site, as needed for the new macro expander.
2015-08-13 10:44:26 -06:00
Asumu Takikawa
a970f9bf6e Fix a few cases of "it's" instead of "its" in docs 2015-08-11 21:29:22 -04:00
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
边城
6fe8f635e4 update packges sources
Add Racket package manager to package sources
2015-08-11 08:06:34 -06:00
Georges Dupéron
666da0b215 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
Georges Dupéron
22bf10e564 Fixed typo in the docs for normal-case-path. 2015-08-11 07:59:23 -06:00
Blake Johnson
fbe8537f18 add compiled-expression-recompile
Uses an unresolver pass, which is expanded to work on more programs.
2015-08-10 16:39:43 -06:00
Vincent St-Amour
d66da8ff3b Fix argument order in guide.
Closes PR15131.
2015-08-10 11:56:33 -05:00
Asumu Takikawa
9f682a3f11 Add prefab structs to match grammar 2015-08-07 20:11:52 -04:00
Matthew Flatt
2661d46929 toward deterministic bytecode generation
Progress toward making the bytecode compiler deterministic, so that a
fresh `make base` always produces exactly the same bytecode from the
same sources. Most changes involve avoiding hash-table order
dependencies and adjusting scope identity. The namespace used to load
a reader extension is also better defined. Plus many other little
changes.

The identity of a scope that is unmarshaled from a bytecode file now
incorporates the hash of the file, and the relative order of scopes is
preserved in a bytecode file. This combination allows compilation to
start with modules that loaded and compiled in different orders
(including delayed loading of bytecode fragments within one file).

Formerly, a reader extension triggered by `#lang` or `#reader` was
loaded in whatever namespace happens to be current. That's
unpredictable and can pollute a module build at the level of bytecode.
To help make builds deterministic, reader extensions are now loaded in
a root namespace of the current namespace.

Deterministic compilation in general relies on deterministic macros.
The two most common ways for a macro to be non-deterministic are by
using `gensym` (use `generate-temporaries`, instead) and by using an
unsorted hash-table traversal (don't do that).

At this point, bytecode generation is unlikely to be completely
deterministic, since I uncovered non-determinism mostly by iterating
attempts over the base collections. For now, the intent is not to
provide guarantees outside of the compilation of the base collections
--- but "more deterministic" is likely to be useful in the short run,
and we can improve further in the long run.
2015-08-07 15:48:39 -06:00
Matthew Flatt
6bcb449b55 fix impersonator-property:application-mark propagation
Propagate the mark value only if it's on the current continuation
frame, as originally intended. Adjust the docs to clarify.
2015-08-07 05:30:25 -06:00
Matthew Flatt
27fed2b1ed document compiler/zo-struct changes for new bytecode form 2015-08-07 05:30:25 -06:00
Vincent St-Amour
cdea0da566 Fix package name. 2015-07-30 16:26:56 -05:00
Benjamin Greenman
7259a2c76c typo: add supertype to provided zo struct
Changed doc to match `zo-structs.rkt`
2015-07-30 14:58:57 -06:00
Matthew Flatt
545c14a9cf adjust some versions in history notes
Promote v6.2.0.x changes to v6.3, since they will not be in v6.2.1.
2015-07-30 14:49:31 -06:00
Matthew Flatt
7b4d25c657 add missing history note on stream* 2015-07-30 14:45:29 -06:00
Matthew Flatt
3dc1dc80e3 add setup/collection-search 2015-07-30 14:12:04 -06:00
Jay McCarthy
2602ff530d Adding no major collection guarantee to collect-garbage minor collections 2015-07-30 11:42:13 -06:00
Jay McCarthy
2f22f86c0a Adding minor collections to collect-garbage 2015-07-30 11:42:13 -06:00
Matthew Flatt
99f29ce8ee repair for nexted splicing forms that define the same name
Nested splicing forms would lead to an "ambigious binding" error
when the nested forms bind the same name, such as in

 (splicing-let ([a 1])
   (splicing-let ([a 2])
     (define x a)))

The problem is that splicing is implemented by adding a scope to
everything in the form's body, but removing it back off the
identifiers of a definition (so the `x` above ends up with no new
scopes). Meanwhile, a splicing form expands to a set of definitions,
where the locally bound identifier keeps the extra scope (unlike
definitions from the body). A local identifier for a nested splicing
form would then keep the inner scope but lose the outer scope, while
a local identifier from the outer splicing form would keep the outer
scope but no have the inner one --- leading to ambiguity.

The solution in this commit is to annotate a local identifier for a
splicing form with a property that says "intended to be local", so the
nested definition will keep the scope for the outer splicing form as
well as the inner one. It's not clear that this is the right approach,
but it's the best idea I have for now.
2015-07-29 06:11:13 -06:00
Benjamin Greenman
0c3b524de8 typo: prefix struct field name
Change `inspector-desc` to `src-inspector-desc`
2015-07-28 15:45:01 -06:00
Vincent St-Amour
496cd97351 Rename open-place to place/context. 2015-07-28 16:14:29 -05:00
Jay McCarthy
cc1c989942 clarify text 2015-07-28 14:26:36 -06:00
Jay McCarthy
840f11d884 Add test-include-paths and allow test-omit-paths to use regexps 2015-07-28 14:19:49 -06:00
Benjamin Greenman
11ccb7c530 typo: ARepresents -> Represents
In description for `decoded-module-binding`
2015-07-28 11:42:33 -05:00
Vincent St-Amour
a75b2292af Fix docs for racket/logging to be consistent with make-log-receiver's. 2015-07-28 11:26:09 -05:00
Asumu Takikawa
75e19c9435 Fix docs for syntax-debug-info 2015-07-27 17:16:57 -04:00
Alex Knauth
595925e436 fix doc typos 2015-07-27 10:47:53 -06:00
Brian Lachance
3c98fc54aa Fix bugs/typos in docs for contracts and quote-syntax
1st is a small grammatical mistake
2nd is in a section about ->* yet mistakenly -> is referred to
3rd is about recontract-out yet contract-out is mentioned instead
4th clarifies return value for value-contract
5th replaces free-identifier? with free-identifier=?
2015-07-27 10:47:06 -06:00
Matthew Flatt
9593b4c806 make-syntax-introducer: add optional argument to change kind of scope
Genereating a use-site scope, instead of a macro-introduction scope,
prevents the scope's presense from triggering a #f result from
`syntax-original?`.
2015-07-25 14:37:54 -06:00
Vincent St-Amour
0f2d02cdd2 Move part of unstable/logging to racket/logging.
... and improve and extend its interface at the same time.
2015-07-23 12:22:51 -05:00
Vincent St-Amour
46a8506f99 Add missing label require. 2015-07-23 12:22:50 -05:00
Vincent St-Amour
0864d5848b Doc typo. 2015-07-23 12:22:50 -05:00
Vincent St-Amour
4ee1864941 Merge unstable/place with racket/place. 2015-07-23 12:22:50 -05:00
Vincent St-Amour
91c422bb66 Merge unstable/future with racket/future. 2015-07-23 11:43:37 -05:00
Andrew Gwozdziewycz
ef716ed15d Replace celcius (a common mispelling) with celsius 2015-07-23 11:21:22 -05:00
Sam Tobin-Hochstadt
960fc831fc Provide promise/name?. 2015-07-22 14:33:30 -04:00
Matthew Flatt
594bdd6e61 fix incomplete text of docs for syntax-local-introduce 2015-07-22 11:17:07 -06:00
Matthew Flatt
2cf01f0257 raco exe: fix interaction of submodules and using source
Also, fix the interaction of submodules plus `--collects-dest`, but
there's room for improvement there in pruning unused submodules.
2015-07-22 10:54:31 -06:00
Matthew Flatt
76a0eef121 make Reference dependency on DrRacket docs indirect
Avoids a dependency of "racket-doc" on "drracket".
2015-07-21 09:20:29 -06:00
Vincent St-Amour
1083a31965 check-duplicate -> check-duplicates
For consistency with remove-duplicates.
2015-07-20 16:00:53 -05:00
Vincent St-Amour
7700b3d736 Move contents of unstable/hash to racket/hash. 2015-07-20 16:00:52 -05:00
Vincent St-Amour
952df81877 Move remf from unstable/list to racket/list.
Add remf* for consistency.
2015-07-20 16:00:52 -05:00
Vincent St-Amour
c0408de912 Move various common prefix functions from unstable/list to racket/list.
Make their interface consistent with the rest of racket/list.
2015-07-20 16:00:52 -05:00
Vincent St-Amour
067ed4ccac Move list-update and list-set from unstable/list to racket/list. 2015-07-20 16:00:52 -05:00
Vincent St-Amour
5e23ad6ccf Move group-by and cartesian-product from unstable/list to racket/list. 2015-07-20 16:00:52 -05:00
Vincent St-Amour
4d9751e98c Move check-duplicate from unstable/list to racket/list.
Make its interface uniform with remove-duplicates.
2015-07-20 16:00:52 -05:00
Vincent St-Amour
0e6baea9f6 Move contents of unstable/function to racket/function.
Split implementation of racket/function to avoid circular dependencies.
2015-07-20 16:00:52 -05:00
Robby Findler
e7e184a0ba link from 'disappeared-use and 'disappeared-binding in reference to check syntax 2015-07-20 10:29:24 -05:00
Gustavo Massaccesi
9fe6c138cf Fix typos in docs 2015-07-18 20:44:36 -06:00
Matthew Flatt
e954ce0ffa document raco setup --fast-clean 2015-07-16 18:24:25 -06:00
Matthew Flatt
fc5e32e526 switch to set-of-scopes expander
The development history for set-of-scopes is preserved in a "scope"
branch in the main Racket repository, which is commit
 ae88c96f50
2015-07-16 14:20:00 -06:00
Matthew Flatt
ec6c88442d fix length-specifying form of _bytes to include room for nul 2015-07-16 07:10:36 -06:00
Matthew Flatt
331b104345 JIT: inline ptr-ref and ptr-set!
Special treatment of `ptr-ref` and `ptr-set!` applies when the second
argument is one of a few primitive C types: `_int`, `_double`, etc.
2015-07-02 15:59:35 -06:00
Eric Dobson
5cd910f9f2 Fix docs on channel synchronization 2015-06-29 17:34:57 -06:00
Matthew Flatt
290020c597 ffi/unsafe: add #:lock-name option to _fun and _cprocedure
While `#:in-original-place? #t` provides one way to serialize
foreign calls, it acts as a single lock and requires expensive
context switches. Using an explicit lock can be more efficient
for serializing calls across different places.

For example, running "plot.scrbl" takes 70 seconds on my machine
in the original place and using `#:lock-name` in any place,
while it took 162 seconds in a non-main place with Cairo+Pango
serialization via `#:in-original-place? #t`.

Internally, the named lock combines compare-and-swap with a
place channel. That strategy gives good performance in the case
of no contention, and it cooperates properly with the Racket
scheduler where there is contention.
2015-06-25 10:35:22 +08:00
Matthew Flatt
f7e1fcd557 log a warning for shadowing an import with a definition 2015-06-24 07:15:29 +08:00
Matthew Flatt
ea016bec96 allow definition in module to shadow a preceding import
This change is experimental and intended to reduce (but certainly not
eliminate) the problem of breaking existing code by adding exports to
a module.
2015-06-23 21:31:57 +08:00
Eric Dobson
82218f33bd Fix docs on thread-resume-evt
It returns `thd` as in the previous sentence, not itself.
2015-06-20 21:43:34 +08:00
Tony Garnock-Jones
4b2c9cfbcc Add exn->string, following the function of the same name in the web-server. 2015-06-20 21:43:33 +08:00
Gustavo Massaccesi
502575b641 Typos in docs of raco setup 2015-06-20 21:43:33 +08:00
Alexis King
c79f646545 Add stream* to complement stream 2015-06-20 21:43:27 +08:00
Vincent St-Amour
97827acba6 Fix name of command in docs. 2015-06-11 14:03:16 -05:00
Sam Tobin-Hochstadt
fc6ead4ac2 Improve match compilation of ? and fix bugs.
- Coalesce repeated use of the same predicate.
- Fix scoring of Exact patterns, and scoring generally.
- Use `OrderedAnd` where needed.
- Guarantee that `and` patterns match in order.
- Thread bound variable information properly in GSeq compilation.
- Warn when variables are used non-linearly with `...`
  (making this behave properly was not backwards compatible).

Closes #952, which now runs in <1ms and make it a test case.

Also add margin note about `?` patterns and multiple calls.
2015-06-05 18:08:33 -04:00
Matthew Flatt
e1e89adf62 adjust Active-X example to work with newer IE 2015-06-05 09:15:25 -06:00
Alexis King
35c3554343 Make pair accessor shorthand examples properly link to id docs 2015-06-04 06:48:18 -06:00
Matthew Flatt
4ba3adf11b document raco read 2015-06-04 06:48:18 -06:00
Alexis King
495784ed49 Fix contract error in in-vector documentation example 2015-06-04 07:38:57 -05:00
Matthew Flatt
0bed8e8928 fix command-line docs for flags that start "--"
Closes PR 15080
2015-05-31 06:06:22 -06:00
Robby Findler
78ecccc2b1 fewer quotes 2015-05-19 11:17:17 -05:00
Alex Knauth
d30b90cba3 contract docs: explain positive and negative as server and client 2015-05-19 11:14:13 -05:00
Matthew Flatt
12308e3f17 clarify in docs that threads provide sequential consistency 2015-05-16 15:19:13 -06:00
Matthew Flatt
32a2ca6eff doc clarification on output functions and mutable arguments 2015-05-16 15:04:32 -06:00
Asumu Takikawa
c2cd44c928 Implement class sealing/unsealing
Adds a sealing and unsealing function to attach (or detach)
seals onto a class via impersonator properties. Since these
properties override, they do not accumulate wrappers.

Calling seal multiple times will still accumulate multiple seal
values inside the property.

A sealed class cannot be instantiated and a subclass may not
add class members that match any of the sealed names in its
sealed parent.

These functions are intended for use by TR's `sealing->/c`
contract, but are parameterized over checking functions and
could be used for other purposes.
2015-05-13 13:21:51 -04:00
Mark Lee
e4a48723b3 Fix up documentation on count. Count is more similar to filter-map than it is to filter since it can accept multiple lists. 2015-05-13 11:03:22 -04:00
Alexis King
b450aa8af6 Fix typo in ffi COM docs 2015-05-13 11:02:14 -04:00
Alexis King
aa4c57bf9a Add a char-in flat contract 2015-05-08 16:36:33 -05:00
Stephen Chang
7d434d266e add free-id sets
merges github pull-request #815
2015-05-04 19:05:07 -04:00
Mark Lee
c44cffe5a8 Add example of struct subtype inheritance of supertype. Clarify struct subtype inherits the prefix of the struct supertype. 2015-05-03 10:20:26 -06:00
Matthias Felleisen
ed0e98b305 Robby's improvement for Jay's things 2015-05-03 09:25:50 -04:00
Matthias Felleisen
ab145d4c7d touching up Jay's patch 2015-05-02 12:11:14 -04:00
Matthias Felleisen
a691372419 Jay's patch for style guide 2015-05-02 12:11:14 -04:00
Stephen Chang
9e8971ba95 update gen:set defaults and docs
- set-copy-clear has no fallback - update docs to match impl
- set-copy fallback should use set-copy-clear not set-clear
2015-05-01 19:38:44 -04:00
Greg Hendershott
2c76954108 Note exn:break-continuation not usable with with-handlers. 2015-05-01 16:07:02 -06:00
Matthew Flatt
d6b587288a Adjust "6.2.0.2" history notes to just "6.2"
Due to our release process, these changes will be included in v6.2
after all.

Merge to v6.2
2015-04-28 15:36:04 -06:00
Robby Findler
67746f578d fix link of Queinnec paper 2015-04-25 17:12:40 -05:00
Robby Findler
68b3371418 add get-current-doc-state, doc-state-changed?, and doc-state? 2015-04-17 04:51:57 -05:00
Matthew Flatt
469763ca37 Adjust use of readtable argument in read/recursive
Use the given readtable more consistently to parse
delimiters in the top-level form. This change particularly
addresses problems with trying to restore the original
`(` when parsing a hash table, but allowing nested
forms to still use a different `(` mapping.
2015-04-15 13:01:58 -06:00
Matthew Flatt
968d1a3685 improve docs for file-or-directory-modify-seconds 2015-04-15 08:40:35 -06:00
Matthew Flatt
7fb5e69bc6 fill in missing setup/xref documentation 2015-04-11 15:12:53 -06:00
Eric Dobson
6e5c9a97ed Make docs for sgn correct. 2015-04-10 14:25:33 -06:00
Matthew Flatt
e807e848f9 fix docs for syntax-case
Clarify that if `stx-expr` produces a value other than a syntax
object, it is coerced to one using `datum->syntax`.
2015-04-10 13:30:58 -06:00
Matthew Flatt
cae162685f make _hfun retry automatically
Extend `_hfun` to allow specified exceptions through, and
use it consistently for anything that returns an HRESULT
and might need a retry.
2015-03-27 15:19:19 -06:00
Matthew Flatt
3a75630ea4 add COM enumeration support 2015-03-27 14:43:44 -06:00
Matthew Flatt
d22082f7e5 add #:retry option to _fun 2015-03-27 13:03:20 -06:00
Eric Dobson
e0ee4b1a31 Add docs for fsemaphores in the Synchronization section.
Closes PR 13380.
2015-03-26 11:23:53 -06:00
Asumu Takikawa
d9efa6cc9b Update docs pointers to shell-completion scripts 2015-03-26 10:48:58 -04:00
John Clements
56a701bfae raco test docs module*->module 2015-03-24 10:32:40 -07:00
John Clements
3b08e2cccd omit-tests doc fix 2015-03-24 09:45:42 -07:00
John Clements
4d69fcc8a9 use racket/base instead 2015-03-24 09:42:27 -07:00
John Clements
ca8dad126c add docs on not running tests 2015-03-24 09:39:30 -07:00
Sam Tobin-Hochstadt
58de58fc11 Add history entry for the previous change. 2015-03-19 21:09:37 -04:00
Sam Tobin-Hochstadt
04c89b5ea2 Provide a submodule for begin-encourage-inline.
As suggested in a comment in the file.
2015-03-19 21:01:49 -04:00
Sam Tobin-Hochstadt
f73b4066a7 Add prop:object-name. 2015-03-18 09:55:27 -04:00
Paul Ojanen
e6ffbf2501 Improve reference to code value
Did "temp7" used to print out as "???"?  I would have understood this more quickly if the reference to "temp7" had been more clear.
2015-03-14 17:20:02 -04:00
Paul Ojanen
51079f62ae grammar fix 2015-03-14 17:19:52 -04:00
Joseph Irwin
6b9a50c82d Fix typo in TRG 21.2.1 2015-03-14 17:19:17 -04:00
Joseph Irwin
95a8dfb5a7 Fix typo in TRG 16.2.5 2015-03-14 17:19:15 -04:00
Sam Tobin-Hochstadt
a5be431a74 Add some missing history annotations.
Thanks to @mflatt for pointing this out.
2015-03-13 10:19:58 -04:00
Sam Tobin-Hochstadt
2ce9b40a54 Add match-letrec-values.
Implemented by J. Ian Johnson.

Closes #762.
2015-03-11 19:00:12 -04:00
Leif Andersen
f7db183ab8 Fix typo in find-files doc.
Closes #890.
2015-03-11 17:22:52 -04:00
Sam Tobin-Hochstadt
2ccd4b1a95 Describe match scoping behavior more precisely. 2015-03-11 16:15:17 -04:00
Eric Dobson
5895eabad1 Add break-parameterization?.
Closes PR 11966.
2015-03-09 12:40:08 -06:00
Matthew Flatt
b923269569 make impersonator properties sensitive to prop:impersonator-of
When a structure type has `prop:inpersonator-of`, follow it
when attemptng to access imperonator properties.

This change fixes a problem with `impersonate-procedure` as
reported by Scott Moore.
2015-03-08 19:27:11 -06:00
Matthew Flatt
092f6bb7e1 add object-or-false=? 2015-03-05 14:27:17 -07:00
Robby Findler
0c2ca96ad2 move sequence/c into the part of the docs for racket/sequence 2015-03-05 08:26:54 -06:00
Asumu Takikawa
ab68a4dc38 Add option to ignore local names in opaque class/c 2015-03-04 11:54:56 -05:00
Robby Findler
efee5c4581 move sequence/c into racket/sequence 2015-03-02 22:14:32 -06:00
Asumu Takikawa
f43096b123 Export an alternative object/c constructor
This functional constructor allows runtime construction
of object contracts in extension libraries.
2015-02-24 17:18:40 -05:00
Asumu Takikawa
5dc6be1a17 Allow chaperones on class methods
This allows libraries to add metadata to methods in the form
of chaperone properties which can be read by contracts on
methods.
2015-02-24 17:17:32 -05:00
Javier Olaechea
be6e1a4045 typo in sequences.scrbl
Fix return values in the  documentation of stream-empty?
2015-02-19 10:29:58 -07:00
Matthew Flatt
aae35ea3ac fix stream/c using generics chaperone property support 2015-02-19 09:56:50 -07:00
Matthew Flatt
d69af6af30 add property support to chaperone-generic, etc. 2015-02-19 09:56:50 -07:00
Matthew Flatt
17275b946a raco setup: improve and normalize error reporting
When repoting an error during compilation, always show the path to the
module being compiled. That path was sometimes available in the error
message anyway, due to source locations for syntax errors, but often
there would be no path due to run-time errors in macros, a lack of
source locations on macro-introduced forms, etc.

The `raco setup` improvements rely on new machinery in `compiler/cm`,
and `raco make` inherits that machinery.

The parallel and non-parallel variants of `raco setup` reported
excpetions in slightly different formats, and now they're consistent.
The initial report of an exception now always shows an evaluation
context, while the summary's repeat of the error omits the context.
2015-02-15 09:49:40 -07:00
Matthew Flatt
d747f8f806 require a #:offset keyword before a field offset in define-cstruct
Also, allow `#:offset` specifications on individual fields, instead
of all or node.
2015-02-14 18:40:20 -07:00
Paul Ojanen
2c506a2157 grammar fix 2015-02-14 18:40:20 -07:00
Alexis King
714b7684fe Add stream/c contract for adding contracts on stream contents 2015-02-13 20:14:03 -06:00
Matthew Flatt
0e009117b5 fix docs on print
The default global print handler changed long ago.
2015-02-12 10:17:55 -07:00
Asumu Takikawa
97bd3f7549 Add doc examples for dynamic-require 2015-02-12 10:14:52 -07:00
Asumu Takikawa
e63fbfde7a Clarify docs of dynamic-require on syntax bindings 2015-02-12 10:14:52 -07:00
Matthew Flatt
8c545ae05a adjust docs & history note for println and writeln
When adding a new function or form, use

 @history[#:added "<version>"]

at the end of the documentation for the added function or formœ.
2015-02-12 10:14:51 -07:00
Robby Findler
0e563c6ab3 minor tweaks to define-sequence-syntax docs 2015-02-11 10:53:40 -06:00
Rob Hoelz
912d65948c Link to the guide and reference source locations 2015-02-10 09:46:40 -05:00
Rob Hoelz
578e98afe0 Fix a typo involving keyword<? 2015-02-10 09:46:38 -05:00
Alexis King
62e52bf41d Add writeln and println functions to complement displayln 2015-02-10 09:46:06 -05:00
Matthew Flatt
9c7d0b8794 Unicode 7.0
Closes PR 14971
2015-02-09 11:33:13 -07:00
Matthew Flatt
fe68c9ab81 fix docs again on struct in racket/signature
The repair of 7bfe2eadab wasn't right; the `struct` form is treated
correctly in `define-signature`, but not in `racket/signature`.
2015-02-08 06:52:24 -07:00
Matthew Flatt
2ada651dd3 {chaperone,impersonate}-struct: allow structure type as a witness
Also, do not allow `struct-type` as a wrapped operation in
`chaperone-stuct` without a witness.

Related to PR 14970
2015-02-08 06:52:24 -07:00
Matthew Flatt
be8f70fffb racket/unit: static checking of initialization dependencies
When using `compound-unit/infer` and similar, check the `link` clause
against each unit's static information for initialization dependencies.
Also, propagate dependency information in `define-compount-unit`.
2015-02-06 09:22:01 +01:00
Matthew Flatt
53fb33144e add unit-static-init-dependencies 2015-02-06 08:55:58 +01:00
Matthew Flatt
7bfe2eadab fix docs for struct in define-signature
Unofrtunately, `struct` in a signature corresponds to `define-struct`.
2015-02-06 08:55:58 +01:00
Gustavo Massaccesi
6d5597c090 Change type of result of unsafe-??vector-ref 2015-01-25 07:51:45 -07:00
Gustavo Massaccesi
9ecf98a0a0 Add documentation of unsafe-fxvector-length and friends 2015-01-25 07:51:45 -07:00
Matthew Flatt
e2261096cb doc clarifications on eqv?
Part of the clarification is duplicating information about numbers
and character in the documentation of `eqv?`. Since those two type
are the only special cases of `eqv?`, the duplication seems helpful
and managable.
2015-01-24 10:12:35 -07:00
Matthew Flatt
68c5d3d1d6 fix error message for inexact->exact on +inf.f 2015-01-24 10:12:35 -07:00
Robby Findler
cc642c3382 change +nan.0 and +nan.f, when viewed as contracts, to
be equal?-based contracts instead of = based contracts.

Before this change, the contract (or/c 1 2 +nan.0) was the same
contract as (or/c 1 2), because +nan.0 was the same contract as
the predicate (lambda (x) (= x +nan.0)), which is the same as
(lambda (x) #f). Now, +nan.0 and +nan.f are the only numbers
that are treated as equal?-based contracts, but this means that
(or/c 1 2 +nan.0) actually accepts +nan.0.
2015-01-23 21:57:51 -06:00
Robby Findler
430a4b08c4 fix typo 2015-01-23 09:41:07 -06:00
Matthew Flatt
7196dc0e74 add peak memory use to vector-set-performance-stats! 2015-01-22 10:16:32 -07:00
Matthew Flatt
8035ee354c document format of GC logged message text 2015-01-21 05:39:04 -07:00
Matthew Flatt
3eef017911 track whether a closure uses syntax objects
For GC purposes, if a "prefix" (a closure frame that caprues
top-level or module-level bindings) may refer to syntax objects
that are not used by any reachable closure, in which case the
syntax object can be dropped. This pruning of syntax objects
uses the infrastructure already in place to prune variables.

Syntax objects were not included in the original pruning
implementation, because they are unlikely to create
finalization cycles in the way that global-variable
references can. A syntax object can retain a namespace's
table of module imports, however, which can be substantial
and worth releasing of a closure is only held, say, for
a low-level finalization action.
2015-01-19 21:29:55 -07:00
Alexis King
6e79a582f1 Add documentation for async-channel contracts and impersonators 2015-01-19 19:58:51 -06:00
Matthew Flatt
c6802ed107 namespace-attach-module: fix handling of for-template
The handling of `for-template` imports by `namespace-attach-module`
didn't match the docs. The actual handling was to refrain from
attaching instances of a phase-0 module if the instance was reachable
only through a `for-template`. The rationale had to do with such
modules instances being created only through instantiation of
phase-1 modules, and phase-1 module instances aren't attached;
it doesn't work well that way, though, when different modules
are attached with intervening `namespace-require`s on the target
namespace.

The change includes a documentation correction. Previously and still,
only modules at the same phase as the attached module (as opposed to
the same phase or less) are instantiated in the target namespace.

Closes PR 14938
2015-01-18 11:19:49 -07:00
Matthew Flatt
900e788a3a delete-{file,directory} docs: clarify permission change + delete is 2 steps 2015-01-14 08:55:42 -07:00
Matthew Flatt
9f3c82c30a Windows: change delete-{file,directory} to attempt permission correction
If a file or directory delete fails, try adjusting the file or directory
permissions to allow writes, then try deleting again. This process should
provide a more Unix-like experience and make programs behave more
consistently.

A new `current-force-delete-permissions` parameter provides access to
the raw native behavior.
2015-01-13 11:58:36 -07:00
Matthew Flatt
ece9126656 compiler/cm-accomplice: adjust protocol for extra options
Instead of introducing a subtype of `file-dependency` to imply one new
option, add a subtype that has an options table for easier
extensibility. (Thanks to Sam for pointing out that I shouldn't make
this mistake again.)
2015-01-09 11:31:35 -07:00
Gustavo Massaccesi
d03e635ee4 Fix typo in doc of find-executable-path 2015-01-09 11:31:30 -07:00
Gustavo Massaccesi
fc57ba7996 Fix typo in doc of call-with-atomic-output-file 2015-01-09 08:55:58 -07:00
Matthew Flatt
95e85ec5bd add support for indirect CM dependencies; use in lazy-require
If module M in package P imports module N from package Q,
and if N has a `lazy-require` for a module in R that is
triggered during the compilation of M, then P doesn't really
depend on R; P depends on Q, and Q depends on R, and P
shoudn't necessarily know anything about Q. At the same time,
a change to the file in R means that M must be recompiled.
So, continue to track the compilation dependency, but mark
it as "indirect" so that the package-dependency checker can
ignore the dependency.
2015-01-08 09:59:37 -07:00
Matthew Flatt
fe9a04d1db doc tweaks for raco {setup,make} 2015-01-08 09:11:38 -07:00
Robby Findler
cd747e3fb1 fix docs for #:exercise argument
(adding the default value)
2015-01-03 17:16:51 -06:00
Matthew Flatt
9010eb5d19 expand docs on package dependencies and checking 2015-01-03 07:37:58 -07:00
Matthew Flatt
c5d09957ba ffi/unsafe/nsstring docs: fix C type description
The `_NSString` type corresponds to a reference, which is
an `NSString*`.
2015-01-02 18:44:05 -07:00
Gustavo Massaccesi
25013320be Fix is_arity_list 2014-12-29 07:26:15 -07:00
Robby Findler
94d80f0171 add #:pre/desc and #:post/desc to ->i 2014-12-22 22:31:17 -06:00
Robby Findler
9d58a067e3 add #:pre/desc to ->* 2014-12-22 14:53:25 -06:00
Robby Findler
aabe9d7bad added dynamic->* 2014-12-20 22:48:26 -06:00
Matthew Flatt
fadce82fe1 expand docs on package dependency checking in raco setup 2014-12-20 09:04:34 -07:00
Robby Findler
9e9dcf2f50 added hash/dc 2014-12-18 22:31:20 -06:00
Matthew Flatt
b05d07ad10 generalize {impersonator,chaperone}-of? on immutable hash tables 2014-12-18 06:49:10 -07:00
Robby Findler
2f44aef100 fix #:list-contract? argument 2014-12-13 20:51:53 -06:00
Matthew Flatt
63f7cf1568 raco setup: try harder to delete files such as DLLs
If "sqlite3.dll" is installed as a foreign library but shouldn't
be, then `raco setup` cannot simply deleet the file, because
starting `raco setup` opened the DLL. To avoid that problem,
rename the file to start with "raco-setup-delete-", then attempt to
delete the renamed file; the delete won't work, but the file
will be moved out of the way, and a future `raco setup` can
clean up.

The prefix "raco-setup-delete-" thus becomes special on Windows for
the directories that hold foreign libraries, shared files, and
man pages, because `raco setup` will try to delete any file
that starts with "raco-setup-delete-".

It's all very ugly, but I don't have a better idea for the
problems that I keep hitting.
2014-12-13 09:16:52 -07:00
Matthew Flatt
9beca2bdee make: fix bootstrap for native libraries
Restore (but in a hopefully better way) a step that installs native
libraries before trying a full `raco setup`, since the libraries
may be needed for the setup proces --- especially on Windows.
2014-12-13 09:16:51 -07:00
Robby Findler
6f09e7c619 add cons/dc 2014-12-12 23:41:09 -06:00
Ryan Culpepper
6039d6cc0b added register-finalizer-and-custodian-shutdown 2014-12-12 00:25:31 -05:00
Robby Findler
cd2898675f add #:name argument to {transplant,relocate}-{input,output}-port 2014-12-11 14:43:34 -06:00
Matthew Flatt
28f4a39ccb reference: fix docs for octal character literal
Bug reported by Emmanuel Schanzer
2014-12-09 09:22:12 -07:00
Matthew Flatt
542f5fd3d2 ffi/unsafe/custodian: doc clarifications 2014-12-09 09:10:35 -07:00
Matthew Flatt
0adf62bfb9 doc clarification on beg0 bytecode form
From Gustavo, and intended to be part of commit
2d95c39051.
2014-12-08 09:17:05 -07:00
Matthew Flatt
2d4f3e2ac9 remove the "racket-pkgs" directory layer
The layer is now redundant, since everything left in "pkgs" is in the
"racket-pkgs" category.
2014-12-08 05:22:59 -07:00