Commit Graph

644 Commits

Author SHA1 Message Date
shhyou
498f1795db Change the wording of the documentation for impersonate-procedure with wrapper-proc being #f 2016-12-20 08:47:29 -06:00
shhyou
3b6eda5f7d Remove the documentation mentioning chaperon-procedure*? 2016-12-19 23:40:25 +08:00
Robby Findler
23226d4290 clarify docs for unsupplied-arg in ->i
related to #1539
2016-12-17 09:10:17 -06:00
Matthew Flatt
d7b18e7a9c adjust map and for ... in-list to not retain their lists
Adjust list and stream handling as sequences so that during the body

 (for ([i (in-list l)])
   ....)

then `i` and its cons cell in `l` are not implicitly retained while
the body is evaluated. A `for .... in-stream` similarly avoids
retaining the stream whose head is being used in the loop body.

The `map`, `for-each`, `andmap`, and `ormap` functions are similarly
updated.

The `make-do-sequence` protocol allows an optional extra result so
that new sequence types could have the same properties. It's not clear
that using `make-do-sequence` is any more useful than creating the new
sequence as a stream, but it was easier to expose the new
functionality than to hide it.

Making this work required a repair to the optimizer, which would
incorrectly move an `if` expression in a way that could affect
space complexity, as well as a few repairs to the run-time system
(especially in the vicinity of the built-in `map`, which we should
just get rid of eventually, anyway).
2016-12-13 19:20:41 -07:00
Ben Greenman
8de6f581f3 doc: fix types in regexp constructors
- change return types of `pregexp` etc. to use the right predicate
- change input of `byte-regexp` and `byte-pregexp` from `string?` to `bytes?`
2016-12-13 01:43:43 -05:00
Alexis King
62170e6218 Add index(es)-of and index(es)-where to racket/list 2016-12-10 13:01:12 -08:00
Robby Findler
31ca626910 document a default 2016-11-25 09:17:28 -06:00
Sam Tobin-Hochstadt
34fdd2863a Avoid traversing immutable vectors when specified.
This adds #:eager as an option for controlling this behavior.

Using `#:eager 10` is a 2x improvement in performance for configuration 010001
of the suffixtree benchmark from Takikawa et al, POPL 2016.

The default behavior is unchanged. This is configurable because some
programs are much faster when eager checking is performed. For example:

(require racket/contract)
(collect-garbage)
(time (for/sum ([_ 100000])
        (vector-ref (contract (vectorof integer? #:eager #t) #(1) 'pos 'neg)
                    0)))
(collect-garbage)

(time (for/sum ([_ 100000])
        (vector-ref (contract (vectorof integer? #:eager #f) #(1) 'pos 'neg)
                    0)))

The second loop is 3-4 times slower than the first. However, making
the vector much larger will make the difference go the other way.
2016-11-22 11:28:30 -05:00
Robby Findler
09c1174f7e add the #:extra-delay argument to recursive-contract 2016-11-19 15:56:18 -06:00
Leif Andersen
1582178982 Add example for dict-implements/c 2016-11-15 08:29:51 -05:00
Vincent St-Amour
81cd3622d3 Update docs to reflect xrepl being enable by default. 2016-11-08 08:58:21 -06:00
Alexis King
2030c0b0ae Add a missing for-label require to the file/glob docs 2016-10-25 10:22:41 -07:00
Robby Findler
1b834d010a fix wrong name in docs 2016-10-23 22:54:46 -05:00
Matthew Flatt
4ce947da74 update pkg FAQ on the package build service's catalog 2016-10-23 10:43:02 -06:00
Georges Dupéron
153dc01ccd Some small fixes to the documentation
* Wrong contract for syntax-local-value in the documentation.
* Clarified signature in documentation for expand-import, expand-export and pre-expand-export
* Corrected typo in documentation for "for".
* Fixed error message for function which seems to have been renamed in the docs
* Fixed typo in a comment in the tests
* Fixed a typo in the documentation for set-subtract.
* Use double ellipses for the free-id-table-set*, free-id-table-set*!, bound-id-table-set* and bound-id-table-set*! operations
2016-10-19 20:52:45 -05:00
Matthew Flatt
ddf6985020 fix docs on PLT_COMPILED_FILE_CHECK
Merge to v6.7
2016-10-15 07:28:52 -06:00
Matthew Flatt
ff7f1ce9ff update "More" now that xrepl is on by default
Merge to v6.7
2016-10-15 07:28:43 -06:00
Vincent St-Amour
ecadde3a65 Add #:logger keyword argument to with-intercepted-logging.
Closes #1486.
2016-10-11 11:50:33 -05:00
Stephen Chang
58d9b3eb19 add doc example for make-provide-pre-transformer 2016-10-11 11:40:13 -04:00
Vincent St-Amour
241d87c011 Avoid tech collision.
Closes #1484.
2016-10-09 10:54:53 -05:00
Vincent St-Amour
d597983bb9 Make pkg git credential format extensible.
Thanks to Eli.
2016-10-07 14:17:31 -05:00
Alexis King
d9750064b9 Merge pull request #1472 from lexi-lambda/pkg-git-credentials
Add support for git-backed packages that require authentication
2016-10-06 18:24:24 -07:00
Ben Greenman
65a69417cc doc: clarify elements vs values in sequence/c 2016-10-06 18:46:46 -04:00
Ben Greenman
97c65102b3 add file/glob
implements globbing for path strings
- glob : globs -> listof path
  in-glob : globs -> sequenceof path
  glob-match? : globs path-string -> boolean
- wildcards are: * ? [...]
- braces {} get expanded to multiple globs
- if pattern ends with /, only match directories
- wildcards don't capture dotfiles by default (keyword arg overrides)
2016-10-06 18:41:26 -04:00
Alexis King
c459886fc5 Add some warnings about checkout credentials being stored unencrypted 2016-10-06 11:48:48 -07:00
Ben Greenman
684dd2d1cb typo: redeclaration 2016-10-06 08:57:05 -04:00
Ryan Culpepper
c08a2fd57c syntax/parse: add #:and and #:post side-clauses 2016-09-29 17:21:07 -04:00
Alexis King
8de889df5e Add support for the 'git-checkout-credentials raco config option 2016-09-29 13:58:42 -07:00
Ryan Culpepper
6caec0249f syntax/parse: document ~post 2016-09-29 15:53:26 -04:00
Tony Garnock-Jones
5ec147ee40 Add margin-note relating quote-source-file to __FILE__ and __file__. 2016-09-23 14:48:08 -04:00
Matthew Flatt
cfb2a7aa32 in-directory: sort entries
Make `in-directory` more like `directory-list` by sorting
directory content.
2016-09-15 06:11:30 -06:00
John Clements
38622ce276 docs for xml-attribute-encode 2016-09-14 10:39:56 -07:00
Ryan Culpepper
fd4ce5afe4 add more codes to lookup-errno, relax contract (#1433)
lookup-errno now returns #f when given an unknown symbol instead
of raising a contract error. It should not return #f for any
symbol that it previously accepted.
2016-09-12 18:07:44 -04:00
Asumu Takikawa
558fccce98 Add some examples for the JSON docs 2016-09-07 22:46:38 -07:00
Alex Knauth
1952bc4ede fix typo in the syntax-arm docs (#1447) 2016-09-07 14:27:35 -04:00
Andrew Kent
42f4784735 add vector-sort to racket/vector (#1398)
* add vector interface to private/sort.rkt
2016-09-06 17:07:20 -04:00
AlexKnauth
17db8e57f0 update read-cdot documentation 2016-09-01 16:28:06 -04:00
Ben Greenman
5708526055 add index for 'chmod' 2016-08-30 17:55:38 -04:00
Stephen Chang
1ddb4d025c doc typo: nonnegative-exact -> exact-nonnegative 2016-08-30 13:34:22 -04:00
Stephen De Gabrielle
5ef5a4f3cf struct is preferred
changed 'make-struct' to struct
2016-08-25 10:37:06 -05:00
Vincent St-Amour
00f0311473 setup-plt -> raco setup
Survived unnoticed for 6+ years.
2016-08-24 15:33:07 -05:00
Matthew Flatt
a5f0e6dcfc identifier-binding: add mode to report top-level binding info 2016-08-22 08:54:34 -06:00
Alex Knauth
42dcc525b1 add lang-reader-module-paths to factor out copy-pasted code (#1347)
* add lang-reader-module-paths to syntax/module-reader

to be used as the third argument to make-meta-reader in lang-extensions
like at-exp

* document lang-reader-module-paths

* use lang-reader-module-paths in at-exp
2016-08-19 07:42:59 -06:00
Matthew Flatt
c3355f6df2 remove spaces around em dashes 2016-08-19 07:05:47 -06:00
Matthew Butterick
aef8f3e7bd clarify role of empty stop-ids list in local-expand (#1335) 2016-08-19 07:03:54 -06:00
Matthew Butterick
88292a6e13 add a more concise example of patching a phase mismatch (#1331)
* add a more concise example of patching a phase mismatch

* Update phases.scrbl

Clarifications
2016-08-19 07:03:43 -06:00
Matthew Butterick
787915155f add example of negative phase level (#1330)
* add example of negative phase level

* Update proc-macros.scrbl

Remove `eval:error`

* correct dashes
2016-08-19 07:03:19 -06:00
gus-massa
70adb6a502 Fix typo in string-ci=? docs (#1424)
After case-folding the strings, they are compared with equal? instead of eqv?
2016-08-19 06:33:45 -06:00
Matthew Butterick
9f7a0af3e5 update #lang tutorial to use reader submodule (#1409) 2016-08-19 06:33:36 -06:00
Robby Findler
2c7db537cc add indexing for contract syntax properties 2016-08-18 13:16:14 -05:00
Robby Findler
30f946fc4b add history, typos 2016-08-17 15:48:22 -05:00
AlexKnauth
1b1b400f91 add #:newline? argument to pretty-printing functions 2016-08-17 15:44:39 -05:00
Benjamin Greenman
1478f64c14 doc: fix broken link to contract-generate
Replaced with `contract-random-generate`
2016-08-15 20:43:47 -04:00
Matthew Flatt
84793e80ff doc corrections
Fix inacurracies noticed while reimplementing the module and macro system.
2016-08-13 14:15:54 -06:00
Matthew Flatt
71b4f5f6c0 doc corrections for syntax-make-delta-introducer 2016-08-13 14:15:54 -06:00
Matthew Flatt
c9da43378f restore SCHEME_INPORT_VAL and SCHEME_OUTPORT_VAL 2016-08-13 14:15:54 -06:00
Matthew Flatt
21d5d909a6 doc correction for ffi/unsafe/alloc 2016-08-13 14:15:54 -06:00
Matthew Flatt
0034c31820 track cumulative allocation
Extend `current-memory-use` to accept a 'cumulative flag.
2016-08-13 14:15:54 -06:00
Matthew Flatt
ad230d2ca0 improve structure-type property handling
Make the optimizer recognize and track `make-struct-property-type`
values, and use that information to recognize `make-struct-type`
calls that will defnitely succeed because a property that hs no
guard is given a value in the list of properties.

Combined with the change to require-keyword expansion, this
change allows the optimizer to inline `f` in

 (define (g y)
   (f #:x y))

 (define (f #:x x)
   (list x))

because the `make-struct-type` that appears between `g` and `f`
is determined to have no side-effect that would prevent `f` from
having its expected value.
2016-08-07 15:59:02 -06:00
Leif Andersen
dc13793c24 sandwitch -> sandwich
(Apparently the other way was incorrectly in my dictionary.)
2016-08-01 12:41:56 -04:00
Leif Andersen
cb1a1e233e Cannot show system build paths in docs 2016-08-01 09:34:12 -04:00
Leif Andersen
1b050905e9 Add example for collection-file-path 2016-07-31 23:19:49 -04:00
Ben Greenman
22546a3f22 typo: description of module-compiled-name argument 2016-07-30 02:14:01 -04:00
Ryan Culpepper
b7bd836f0f document this-syntax and #:auto-nested-attributes
fixes #1185, #1350
2016-07-29 17:39:33 -04:00
Stephen Chang
c56efb22a6 remove mention of syntax-id-rules in Macros section of Guide 2016-07-29 16:19:43 -04:00
Ben Greenman
ba8b848f94 Accept path-string in syntax/modcode
Changes signatures in `syntax/modcode` to accept `path-string?` arguments
 instead of `path?`.
Before, the docs listed `path-string?` but the contracts used `path?`.
Now they agree.
2016-07-29 12:26:10 -04:00
Marc Burns
ef41bf21cb fix wrong pluralization 2016-07-28 15:33:13 -05:00
Marc Burns
cdf9da7da4 an string -> an immutable string 2016-07-28 15:33:13 -05:00
Alexis King
1b63703ac0 Fix for-label requires for some struct documentation 2016-07-28 15:33:13 -05:00
Matthew Flatt
fc345ed249 add use-compiled-file-check
Along with the `PLT_COMPILED_FILE_CHECK` environment variable, allows
the timestamp check to be disabled when deciding whether to use a
compiled bytecode file.

In accomodating this change, `raco make` and `raco setup` in all modes
check whether the SHA1 hash of a module source matches the one
recorded in its ".dep" file, even if the timestamp on the bytecode
file is newer. (If the compile-file check mode is 'exists, the
timestamp is completely ignored.)
2016-07-26 10:27:08 -06:00
Leif Andersen
c65ad1efad Moved racket/gui/init and racket/gui/interactive to the gui-lib 2016-07-26 10:14:38 -04:00
Leif Andersen
28f693a976 A few more changes based on Matthew's feedback.
Updated docs
2016-07-26 10:14:38 -04:00
Leif Andersen
a6b7af9733 Made changes based on Matthew's comments.
1. Changed the API documentation for scheme_make_hash_tree, adding primitives for:

* SCHEME_hashtr_eq
* SCHEME_hashtr_equal
* SCHEME_hashtr_eqv

2. Changed direct uses of scheme_make_hash_tree to use these enumed values.

3. Fixed bugs in documentation

4. Defaults to racket/interactive (and racket/gui/interactive) if there is nothing in the config file
2016-07-26 10:14:38 -04:00
Leif Andersen
237418ba0c Added documentation for the racket/interactive module 2016-07-26 10:14:38 -04:00
Leif Andersen
933a494fe0 Fix a few typos in the existing docs. 2016-07-26 10:14:38 -04:00
Leif Andersen
e5ff658875 Add docs for hash trees. 2016-07-26 10:14:38 -04:00
Matthew Butterick
b62d0c80e4 Update examples for equal? eqv? eq? (#1391)
Use the same examples for each so it's easier to compare how the behavior differs.
2016-07-26 01:21:45 -05:00
Tony Garnock-Jones
1ba42bb70d Skip whitespace more liberally when parsing PLTSTDERR and friends.
Now accepts any whitespace, not just spaces, ignores both leading and
trailing whitespace, and accepts multiple whitespace characters
separating subterms.
2016-07-25 19:17:35 -04:00
Leif Andersen
f6c9f058e4 Add documentation for syntax/parse/lib/function-header 2016-07-20 14:00:10 -04:00
Leif Andersen
02fa5e06b2 Update docs for racket/init 2016-07-19 17:52:43 -04:00
Asumu Takikawa
ad2c229af1 Add doc examples for FFI union types 2016-07-14 17:30:58 -04:00
Benjamin Greenman
956d10432b typo: argument to 'module-compiled-submodules' (#1370)
Changed from `pre-module?` to `non-star?`
2016-07-10 18:46:24 -04:00
Robby Findler
fdc3b4a685 improve docs for and/c
please merge to the release branch
2016-07-08 15:35:58 -05:00
Sam Tobin-Hochstadt
8d698389e7 Add a way to recognize cpointer predicates. (#1368)
Similar to `struct-predicate-procedure?`. Allows Typed Racket
(and the contract system generally) to avoid chaperone wrapping
for cpointer predicates.
2016-07-08 12:40:03 -04:00
Robby Findler
bdd11100bb add explanation for and/c 2016-07-04 08:08:51 -05:00
Matthew Flatt
8dec2485d6 adjust docs for read-language 2016-07-01 13:30:50 -06:00
Leif Andersen
ebe3a77c2b Update namespace-attach-module docs 2016-06-30 14:20:27 -04:00
Matthew Flatt
3fbb384604 add hash-keys-subset?
This function exposes the fast subset operation that is built in for
immutable hash tables (and used by the set-of-scopes implementation).

Also, make the space optimization implicit for `eq?`-based hash tables
that contain only #t values (instead of explicit and only available
internally). It turns out to be easy and efficient to make the
representation automatic, because the HAMT implementation can support
a mixture of nodes with some containing explicit values and some
containing implicit #t values.
2016-06-30 08:22:18 -06:00
Alexis King
e86fa9f055 Improve with-disappeared-uses and add record-disappeared-use
Now with-disappeared-uses surrounds its body with let, so it can contain
multiple body expressions. The record-disappeared-use function is like
record-disappeared-uses but for a single identifier.
2016-06-29 12:50:14 -05:00
Spencer Florence
431110531b fixed typo in url 2016-06-25 09:31:31 -05:00
Matthew Flatt
871392f09a add inspector-superior? 2016-06-17 10:23:47 -06:00
Bernardo Sulzbach
b0978652b3 Should call vector vec, not lst 2016-06-15 21:21:14 -05:00
Asumu Takikawa
51bd8f3de5 Fix typo for in-combinations contract 2016-06-15 15:08:48 -04:00
Sam Tobin-Hochstadt
547ddaa6f5 Clarify contract comparison for characters. 2016-06-13 10:27:45 -04:00
Matthew Flatt
8d5f196f96 clairfy 'add default of make-syntax-delta-introducer result 2016-06-10 04:34:52 -06:00
Matthew Flatt
9ca0513875 examples and docs for new define-serializable-cstruct version 2016-06-10 04:34:52 -06:00
Ben Greenman
c21d5e780b typo: with-immed-mark-val -> with-immed-mark-def-val 2016-06-08 18:34:36 -04:00
Asumu Takikawa
5e2caa169e Fix Guide link to scmindent 2016-06-08 17:11:15 -04:00
Leif Andersen
c735c88c2d Add examples for resolve-module-path-index docs. 2016-06-08 14:38:07 -04:00
Asumu Takikawa
2a222a8f15 Add examples for _? C type 2016-06-07 15:19:59 -04:00