Commit Graph

37459 Commits

Author SHA1 Message Date
Matthew Flatt
9046d30bcf fix grammar in docs for #%provide 2016-05-05 15:19:47 -06:00
John Clements
5961313e50 Merge pull request #1323 from jbclements/make-match-exn-transparent
make match exception transparent
2016-05-04 20:00:29 -07:00
John Clements
7c26614343 make match exception transparent
This push makes the exn:misc:match exception transparent. This
matches other racket-raised user exceptions.

The motivation for this change was breakage in the handin-server;
specifically, the discussion in

https://groups.google.com/forum/#!topic/racket-users/nEos3-osoWE

...in which the handin-server was not behaving the same on exn:misc:match
because it was not transparent. This caused the handin server to
refuse to rewrite these exceptions, resulting in less helpful
messages for users.
2016-05-04 14:19:04 -07:00
Ryan Culpepper
9d3c193bcf syntax/parse: fix ~datum pattern with compound datum 2016-05-03 05:07:29 -04:00
Ryan Culpepper
430e6e9567 syntax/parse: different fix for deterministic compilation
The previous fix (1acaf011) caused a performance regression
(compilation time?), reported by stchang. Reverting to quote.

Apparently, the problem with gensym and deterministic compilation
isn't the uninterned-ness; it's the global counter used for the
name. So use a compilation-local counter instead.
2016-05-03 04:38:26 -04:00
Ryan Culpepper
c8f3536694 Revert "syntax/parse: fix for deterministic compilation"
This reverts commit 1acaf0111d.
2016-05-03 03:11:08 -04:00
Ryan Culpepper
f7fff58de6 syntax/parse: test different post groups are incomparable 2016-05-03 03:11:08 -04:00
Asumu Takikawa
25c9e9347a Fix nested quasisyntax infinite looping
Thanks to Michael Ballantyne for the bug report
2016-05-02 15:15:47 -04:00
Pedro Caldeira
551ef55535 Add examples for _enum and _bitmask usage. (Close #1317) 2016-05-02 11:21:22 -05:00
Matthias Felleisen
fdcbe249f9 re-organized in preparation for additions 2016-05-01 09:47:39 -04:00
Matthew Flatt
76418e9be8 path->module-path: make sure result is always a module path
Avoid creating a result that is intended as a module path but
has elements that are not syntactically allowed, such as a "."
in a collection-path element.
2016-05-01 07:00:36 -06:00
Robby Findler
244d9957f1 fix syntax error in flat-contract-with-reason docs 2016-05-01 06:27:44 -05:00
Robby Findler
999f026f55 add docs for flat-contract-with-explanation, clarify make-flat-contract docs
closes #1313, related to #1314
2016-04-30 21:06:41 -05:00
Robby Findler
9acd36724d clarify test argument to make-contract, make-chaperone-contract, and make-flat-contract
closes #1313
2016-04-30 21:06:41 -05:00
Robby Findler
bb03281308 add flat-contract-with-explanation
closes #1314
2016-04-30 21:04:08 -05:00
Vincent St-Amour
caebbc65b6 Add example to the free-vars docs.
Thanks to Christophe Scholliers.
2016-04-27 11:02:59 -05:00
Robby Findler
45acc19f44 improve source location in internal-definition errors for syntax-case,
syntax-case*, and datum-case
2016-04-26 16:09:30 -05:00
Matthew Flatt
fb88abd992 fix accidentally committed debugging mode 2016-04-26 14:32:08 -06:00
Matthew Flatt
528b14025f fix syntax-local-lift-module-end-declaration in higher phases
A phase shift was mising on `begin-for-syntax`es introduced by
`syntax-local-lift-module-end-declaration`, which is in turn
used to implement` module+`, so `module+` didn't work under
two or more `begin-for-syntaxes`.

Closes #1312
2016-04-26 10:45:56 -06:00
Matthew Flatt
99b3ed55be make syntax objects work as preserved syntax properties
Syntax objects generally make sense as properties in other syntax
objects, but they require special care when marshaling to bytecode
(as syntax objects do in general). To make that special handling
possible and reliable, constrain the shape of allowed values.
2016-04-26 10:18:46 -06:00
Leif Andersen
f549724e36 Updated scribble docs for make-constructor-style-printer
It should be using gen:custom-write rather than prop:custom-write.
2016-04-25 19:18:11 -04:00
Vincent St-Amour
5cc030e2ad Avoid redundant checking. 2016-04-25 15:41:27 -05:00
Vincent St-Amour
264a11f899 Add procedure-impersonator*?.
Mostly useful to determine whether using `unsafe-chaperone-procedure` is ok.
2016-04-25 15:41:19 -05:00
Matthew Flatt
1381b3ca36 correct and improve docs on number printing 2016-04-25 10:07:32 -06:00
Matthew Flatt
35ab9ffdb8 rename relectly added path-extension to path-get-extension
The name `path-extension` created a conflict for an existing
registered package, so it should not have been added to
`racket/path`.

Also, `path-get-extension` was intended to work on a path
that is syntactically a directory, so fix and test that.
2016-04-24 20:30:51 -06:00
Matthew Flatt
18fd9949a6 fix unmarshaling of perserved syntax properties
Unmarshaling was broken for a syntax object that doesn't have
a 'paren-shape property.
2016-04-24 07:19:02 -06:00
Robby Findler
68b8bf760a make #f always coerce into the same (eq?) contract and make
(or/c #f #t) (or (or/c #t #f)) coerce into the same thing
that boolean? coerces into (and make that also always be eq?)
2016-04-22 15:43:19 -05:00
Robby Findler
bbac97129e avoid an extra call to the contract-specific method for checking stronger
Before this commit, when contract-stronger? is called, it would not
be able to return #f until it calls the contract-specific stronger
method twice
2016-04-22 14:54:33 -05:00
Ryan Culpepper
1acaf0111d syntax/parse: fix for deterministic compilation
Lift compile-time gensyms to vars bound to run-time gensyms.
2016-04-22 09:54:30 -04:00
Ryan Culpepper
accb87eddc syntax/parse: add more tests 2016-04-22 09:54:30 -04:00
Matthew Flatt
b523c9c13f local-transformer-expand: catch lifts in 'top-level mode
Change the one expansion mode as far as I can tell) that disables
lifts so that lifts are now allowed, which means that
`(syntax-transforming?)` implies `(syntax-transforming--with-lifts?)`.

The old documentation incorrectly characterized when lifts
were allowed. Ryan noticed the documentation problem, and that
observation led to this simplication.
2016-04-21 13:58:05 -06:00
Matthew Flatt
9ff64fc6ed GC: guard against excessive fragmentation in incremental mode
Although excessive fragmentation is already detected at the end
of a major GC, it can get out of hand already during a long
incremental phase. So, check for excessive fragmentation and
bail out to a major GC when it happens.

Related to PR 15287
2016-04-19 16:26:42 -06:00
Robby Findler
fa4a6d4c13 fix the 'just check existence' part of object/c contracts 2016-04-19 14:07:50 -05:00
Matthew Flatt
d8c9ae8057 update tests for string->url and path-absolute? 2016-04-19 08:12:12 -06:00
Matthew Flatt
3b1b4a0d26 string->url: always mark as absolute when a host is present
Fixes a failure in the web server tests caused by d23b296627.

Formerly, `(string->url "http://racket-lang.org")`, with no trailing
slash, would produce a `url` structure with `path-absolute?` as #f.
That doesn't exactly make sense, because a URL with a host must always
have an absolute path component. Claiming a relative path component
interacts badly with extending a URL with a path later. (Although
`combine-url/relative` compenstate, a similar function in the web
server doesn't.) The revised `url->string` always sets `path-absolute?`
to #t when a host is present, and whether the path is empty or contains
an empty string still records whether a trailing "/" was present.

The `url->string` function, meanwhile, now needs to use whether the
path is empty to determine whether a "/" should be added after
the host name, not whether `path-absolute?` is true.
2016-04-19 05:42:07 -06:00
Matthew Flatt
ddd4190edf GC: improve backtrace info for 'interior pointers 2016-04-19 05:25:07 -06:00
Matthew Flatt
84bffd41af GC: fix backtrace reporting
The addition ot limited recursive marking broke the implementation
of memory-debugging backtraces.
2016-04-18 18:39:20 -06:00
Matthew Flatt
027dd9a43c untgz and gunzip: report unexpected end-of-file
Report an explicit "unexpected end-of-file" error instead of
a later contract failure on #<eof> insteda of a byte

Closes #1204
2016-04-18 08:25:41 -06:00
Matthew Flatt
734d81fed1 clarification on PLT_VALIDATE_COMPILE
Closes #1181
2016-04-18 08:25:41 -06:00
Ryan Culpepper
837fe2a91a use group-by 2016-04-18 09:13:11 -04:00
Ryan Culpepper
6da3e88bd8 fix and update syntax/parse/debug 2016-04-18 09:13:11 -04:00
Ryan Culpepper
4e6438eaf2 syntax/parse: add groups of post progress
This is a partial solution to the ~and problem, only for side clauses.
In (~and p1 p2 p3), one often wants errors in p2 to take precedence over
errors in p1, and likewise for p3 over p2. One solution is ~commit, but
that prevents backtracking. Another is ~post, but then two ~post wrappers
are needed around p3. Also, it doesn't make sense to compare progress of
the third #:with clause from stxclass A to the second #:with clause of
stxclass B and say third beats second.

So, generalize 'post to (post group index); post frames are comparable to
each other only if group is the same, then compared by index. (Post still
beats CAR and CDR.) Each set of side clauses shares a group.

For simplicity of code generation for now, use gensyms to identify groups.
2016-04-18 09:13:11 -04:00
Matthew Flatt
51061c0829 fallback for sqlite3_clear_bindings
Work with older SQLite, such as the one with Fedora 6

Closes #769

Merge to v6.5
2016-04-17 14:24:52 -06:00
Matthew Flatt
dda791c8cb remove unneeded use of long-double function
Using stdtold() instead of strtod() causes trouble with the
version of gcc on Fedora 6.

Merge to v6.5
2016-04-17 11:35:50 -06:00
Matthew Flatt
f75729ef41 raco pkg: improve error reporting for bad URLs
Related to #1257
2016-04-17 09:10:06 -06:00
Matthew Flatt
6b522f50da updated test and docs for url->string and srtung->url
Test and document host-plus-absoulte-path constraint on string forms.
2016-04-17 09:05:16 -06:00
Matthew Flatt
d23b296627 URL string conversions: disallow host plus relative path
Closes #1257
2016-04-17 09:02:19 -06:00
Matthew Flatt
1fb0f4d143 improve docs for path-only
Closes #1289
2016-04-17 08:36:43 -06:00
Matthew Flatt
a0b5403bd8 Tests and docs for an IPv6 literal address as host in a URL 2016-04-16 21:30:26 -06:00
Matthew Flatt
53ffad767b net/url-string: support URLs that contain IPv6 literals
Since an IPv6 literal address includes ":"s, it must be written
between "[" and "]" as a host name.

Based on a patch by @Phlosioneer and comments by @Blaisorblade,
with additional changes to make `url->string` work.

Closes #980
Closes #1243
2016-04-16 21:19:33 -06:00