Commit Graph

372 Commits

Author SHA1 Message Date
Matthew Flatt
2cf6691439 expose read capabilities of string->number
Extend the `string->number` parser for use by readers, which need
error messages and/or extflonum results.
2017-01-13 08:09:19 -08:00
Matthew Flatt
08ca76b741 extend {read,peek}-char-or-special
Support an external implementation of `read-syntax` by exposing
functionality that is currently internal to `read-syntax`: a srcloc
argument to a "special"-producing port function and wrapping special
results to reliably distinguish them from characters.
2017-01-13 08:09:18 -08:00
Alex Knauth
286e5bebed doc: switch "A is the result of B" to make more sense 2017-01-10 22:03:30 -06:00
Matthew Flatt
6bb4f2ecad update docs to clarify handling of paths in syntax object srclocs 2017-01-08 07:14:28 -06:00
Robby Findler
67da8dbaf0 add a tech link for "path or string" 2017-01-04 09:18:54 -06:00
Robby Findler
abc061aae1 style tweaks, following the style guide 2017-01-04 09:18:54 -06:00
Alexis King
597661fa4e Make range from racket/list act like in-range when used with for 2017-01-03 15:26:42 -08:00
Robby Findler
efb96c97b5 add #:name-for-blame to define-module-boundary-contract 2017-01-03 07:10:30 -06:00
Robby Findler
c4926b5684 clarify the purpose of the (bad) match expander example
closes #1553
2016-12-30 08:51:00 -06:00
Matthew Flatt
710320e3dc "Mac OS X" -> "Mac OS"
Although "macOS" is the correct name for Apple's current desktop OS,
we've decided to go with "Mac OS" to cover all of Apple's Unix-like
desktop OS versions. The label "Mac OS" is more readable, clear in
context (i.e., unlikely to be confused with the Mac OSes that
proceeded Mac OS X), and as likely to match Apple's future OS names
as anything.
2016-12-23 12:18:36 -07:00
Robby Findler
deaf48ae30 add #:use-wrapper-proc to racket/surrogate 2016-12-21 15:12:15 -06:00
Robby Findler
3e191fef04 misc small improvements to racket/surrogate
(generate less code in macro, add some basic test cases,
 small improvement to syntax errors, and small docs clarification)
2016-12-21 12:35:59 -06:00
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
Robby Findler
1b834d010a fix wrong name in docs 2016-10-23 22:54:46 -05: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
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
Ben Greenman
65a69417cc doc: clarify elements vs values in sequence/c 2016-10-06 18:46:46 -04:00
Ben Greenman
684dd2d1cb typo: redeclaration 2016-10-06 08:57:05 -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
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
Matthew Flatt
a5f0e6dcfc identifier-binding: add mode to report top-level binding info 2016-08-22 08:54:34 -06:00
Matthew Butterick
aef8f3e7bd clarify role of empty stop-ids list in local-expand (#1335) 2016-08-19 07:03:54 -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
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
0034c31820 track cumulative allocation
Extend `current-memory-use` to accept a 'cumulative flag.
2016-08-13 14:15:54 -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