Commit Graph

25323 Commits

Author SHA1 Message Date
Robby Findler
a425ee5207 improve the name of recursive-contract (thanks, Asumu!)
closes PR 13686
2013-04-11 22:44:56 -05:00
Burke Fetscher
41d90c6dd5 redex: syntax error fix for define-relation
please merge to the release branch
2013-04-11 22:34:29 -05:00
Robby Findler
e6122d5fbd fix listof error reporting
closes PR 13685

please merge to the release branch
2013-04-11 19:35:09 -05:00
Robby Findler
6cc0581dcd add Burke to acks
please merge to release branch
2013-04-11 19:35:07 -05: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
Robby Findler
e5ae68a0c2 Add Burke to redex responsibility
(and remove Casey)
2013-04-11 14:06:40 -05:00
Matthew Flatt
98c5209c95 ffi/unsafe: fix doc typo
From Tobias

Closes PR 13684

Merge to v5.3.4
2013-04-11 10:30:00 -06:00
Matthew Flatt
c1d9b0716e dist-spec fix for `raco setup' extra file 2013-04-11 10:11:58 -06:00
Matthew Flatt
d195e3889b raco pkg: fix `raco setup' sensitivity to package scope
Merge to v5.3.4
2013-04-11 09:54:17 -06:00
Matthew Flatt
ff324f9270 raco setup: remove any extra documentation dirs in installation
After uninstalling a package in installation scope, its documentation
should be removed. A new `raco setup' step takes care of that.

Merge to v5.3.4
2013-04-11 09:54:17 -06:00
Matthew Flatt
0b2c9af57c move handin-client' and handin-server' to `handin' package 2013-04-11 09:54:17 -06:00
Matthew Flatt
ef6639f4c7 pkg docs: add a tag for the "how to develop" section
Merge to v5.3.4
2013-04-11 09:54:17 -06:00
Jay McCarthy
f29a071774 Normalize max-waiting contracts 2013-04-11 08:33:29 -06:00
Jay McCarthy
1bdf6e67dd Adding max-waiting to serve/servlet, re dyoo 2013-04-11 08:33:29 -06:00
Jay McCarthy
f340939677 Changing default max-waiting to 511 re Apache 2013-04-11 08:33:29 -06:00
Jay McCarthy
7dd9cc9568 Adding link 2013-04-11 08:33:29 -06:00
Jay McCarthy
5c4952ba03 Fixing PR13683 2013-04-11 08:33:29 -06:00
Matthew Flatt
fd614991e6 code tweaks 2013-04-11 06:50:13 -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
Robby Findler
d710550f0a make opt/c use a more comprehensive list of known-to-be-good
predicate contracts

also make it just evaporate when the contract is unknown
(instead of leaving a wrapper behind around the contract)
2013-04-10 18:32:25 -05:00
Matthew Flatt
d4fa2766c2 performance tweaks for `for/{fx,fl,extfl}vector'
Also, provide a better error message when the body produces a
non-{fix,flo,extflo}num.
2013-04-10 17:26:38 -06:00
Burke Fetscher
3feb6cf039 add a consistency check on the final environment
Specifically, check that fully instantiated terms
with cstrs on them satisfy those cstrs.
2013-04-10 16:13:45 -05:00
Matthew Flatt
e49956e3ea fix hole in validator
The validator was not as smart as the compiler in determining
that a `let' expression could be relied on to produce a
constant-shaped function (without side effect or error) in the case
that a right-hand side expression is a call to a known structure
constructor or predicate.

Closes PR 13679

Merge to v5.3.4
2013-04-10 15:06:13 -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
Matthew Flatt
cfe9f447c8 fix sandbox test to avoid influence from other tests 2013-04-10 12:04:52 -06:00
Burke Fetscher
468d2b192e redex: elminate another #f/failure confusion 2013-04-10 12:59:15 -05:00
Asumu Takikawa
3946d7ff78 Fix environment variable doc typos 2013-04-10 12:50:46 -04:00
Matthew Flatt
6e0492dff0 fix a UDP multicast test to make it work on Windows XP 2013-04-10 09:11:28 -06: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
Matthew Flatt
de9b77ad6d plai/{gc2/}mutator: doc fixes
A symptom of mismatched `for-label' imports was that searching for "<="
would show red-underlined links to the `plai/{gc2/}mutator' documentation.

Merge to v5.3.4
2013-04-10 06:59:33 -06:00
Robby Findler
2decc99b26 add forgotten piece to the opt/c -> fix 2013-04-09 22:23:01 -05:00
Robby Findler
4da6b0904e add something that tracks the size of .zo files over time
(this is for our benefit via drdr)
2013-04-09 22:02:49 -05:00
Robby Findler
011f47540d fix opt/c for -> contracts when the function accepts keyword arguments 2013-04-09 22:02:49 -05:00
Robby Findler
b8058b381a adjust mzlib contract test suite for fixed or/c names 2013-04-09 22:02:49 -05:00
Danny Yoo
075212d07c Correct typo. 2013-04-09 15:49:11 -06:00
Matthew Flatt
2295d16074 fix `raco setup -j' for a non-places build
When places are not enabled, then `raco setup' uses multiple
Racket processes that commuincate via pipes. Don't try to send
a place channel over a pipe.

Merge to v5.3.4
2013-04-09 12:20:13 -06:00
Matthew Flatt
8d7c231cd8 doc clarification 2013-04-09 10:55:21 -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
caad82f91e remove the code duplication in opt/c
The code duplication was there only to support
constructing the name for the optimized contract;
instead we actually just built the name as we go
(the old version actually built the old contract
 and then used that to get the name)

also:
 - racket/contract/base now requires basic-opters.rkt
   so all of the opters are registered when racket/contract/base
   is loaded, not just the non-basic ones
 - fix the ordering of the names of subcontracts in or/c
 - make opt-contracts print a more meaningful name
2013-04-09 09:41:46 -05:00
Eli Barzilay
436d9f25f9 Distribute all COPYING*.txt files. 2013-04-09 05:41:22 -04:00
Eli Barzilay
f57fbd94a6 Fix old pointers to COPYING.txt that should go to COPYING_LESSER.txt. 2013-04-09 05:41:07 -04:00
Eli Barzilay
bc7230bea2 Add missing responsible. 2013-04-09 05:15:57 -04:00
Matthew Flatt
8b5523bd10 fix `for/flvector', etc. unsafety
Closes PR 13675

Merge to v5.3.4
2013-04-08 17:45:02 -06:00
Tony Garnock-Jones
94e36c8193 Tests for UDP multicast primitives 2013-04-08 15:23:01 -06:00
Robby Findler
f093131607 adjust pick-a-maze based on Neil's comments
please include in the release
2013-04-08 16:09:55 -05:00
Matthew Flatt
d5ede87ae8 JIT for ARM
Includes switch from LGPL 2.1 to LGPL 3, since the ARM port
of GNU lightining is licensed under LGPL 3.
2013-04-08 14:43:30 -06:00
Matthew Flatt
bc5c89cbf0 fix a non-deterministic test 2013-04-08 14:43:29 -06:00
Burke Fetscher
495e5c94cf redex: bug fix for gerating terms including #f
please include in the release
2013-04-08 15:03:01 -05:00
Vincent St-Amour
aac22e1ce5 Better error message for non-existent generics groups.
Closes PR13671.
2013-04-08 14:43:29 -04:00
Robby Findler
1ebf66252f fix test suite to match earlier fix to obligation info
merge to release branch, please
2013-04-08 13:40:56 -05:00
Robby Findler
d9adb4e6e9 fix improper fraction display
closes PR 13558

please include in the release
2013-04-08 13:40:55 -05:00
Robby Findler
caec6d0711 shortcircuit some of the code involved in drawing the margin highlight
for online expansion errors

This avoids drawing the margin highlight when it isn't inside the
region being repainted and it avoids even figuring anything out about it
when there is currently no error range

NOT for the release branch
2013-04-08 13:40:55 -05:00
Asumu Takikawa
5735d37794 Use any/c for the ip-address-string? domain
Previously, it was `string?` which is needlessly
restrictive and caused premature contract failures.

Please merge into 5.3.4
2013-04-08 11:18:57 -04:00
Jay McCarthy
c396d1e435 Adding documentation notes re Eli 2013-04-08 06:41:14 -06:00
Robby Findler
ccda5a84ad fix box/c and vector/c obligations
closes PR 13673
2013-04-07 19:57:41 -05:00
Robby Findler
6f7c938c0b fix ->m for keyword arguments
closes PR 13674
2013-04-07 19:57:41 -05:00
Robby Findler
f735e6a17e Go to a 12x12 maze to make it slightly easier to win 2013-04-06 22:38:51 -05:00
Robby Findler
d045db0d8f Tally Maze 2013-04-06 22:21:50 -05:00
Robby Findler
d8f455158c make the get/extend extension more flexible
Specifically, allow a name to be specified with an
extension such that subsequent uses of those extensions
will replace mixins instead of adding new ones
2013-04-06 19:04:05 -05:00
Robby Findler
8ce213bf1c extend proc-doc to support optional arguments in an ->i contract
also refactor to be able to add some unit tests
2013-04-06 19:04:05 -05:00
Robby Findler
a72046285d fix bad call to raise-argument-error and use ->i instead of ->d
for the mixin contracts
2013-04-06 19:04:05 -05:00
Robby Findler
4632899b81 get a better name for certain contract error messages
related to PR 13665
2013-04-06 19:04:04 -05:00
Robby Findler
8231db1961 fix non-terminal reference 2013-04-06 19:04:04 -05:00
Jay McCarthy
47c1334f6d A few links 2013-04-06 15:07:07 -06:00
Jay McCarthy
259621f7cb Fixing PR13657 2013-04-06 15:07:07 -06:00
Jay McCarthy
06767ab8c3 Fixes PR13655 2013-04-06 15:07:06 -06:00
Burke Fetscher
a97ff69cd0 test-equal->test for better drdr source loc info 2013-04-06 15:20:15 -05:00
Matthew Flatt
88c7bb59d4 fix `udp-bind!' test 2013-04-06 10:50:02 -06:00
David Van Horn
213430f728 Add #:lang and input-program inputs to make-base-eval and friends.
This commit extends make-base-eval, make-base-eval-factory, and
make-eval-factory with an #:eval and input-program inputs so that
these functions are more like racket/sandbox make-evaluator.
2013-04-06 09:00:41 -06:00
Matthew Flatt
ee78b70e4a doc search: fix mismatch between generator and renderer
This change revisits commit eb7fa6f066. I think the problem
is not in the rendering of index entries but on the generation
side. The generator was converting Xexprs to strings, except
that strings were left as-is, which is inconsistent. So,
I've reverted commit eb7fa6f066 and fixed the generator.
2013-04-06 07:43:49 -06:00
Matthew Flatt
b82cadaf99 reference: fix grammar for cross-phase expressions 2013-04-06 07:42:59 -06:00
Matthew Flatt
7c4cfdd367 reference: adjust docs for UDP multicast
Minor style changes to better match the rest of the docs,
plus "HISTORY.txt" entry.
2013-04-06 07:22:31 -06:00
Tony Garnock-Jones
314bc49714 UDP Multicast primitives and documentation. 2013-04-06 06:49:13 -06:00
Tony Garnock-Jones
d78456b88b Support SO_REUSEADDR on (udp-bind!), for multicast use. 2013-04-06 06:49:13 -06:00
Matthew Flatt
f24b91a1cc fix interference of unboxing inference for different arguments 2013-04-06 06:42:01 -06:00
Robby Findler
77163fe8d1 add the ability to load in new mixins to DrRacket's
various get/extend:extend functions
2013-04-05 22:39:20 -05:00
Robby Findler
b05767ab13 add support for firing up a REPL to poke at DrRacket 2013-04-05 22:39:19 -05:00
Robby Findler
0ea2b61857 fix bug in online check syntax 2013-04-05 22:39:19 -05:00
Asumu Takikawa
9eaf5aaddb Remove unnecessary type->contract case 2013-04-05 16:56:50 -04:00
Asumu Takikawa
0161dfdf16 Translate Value types to ctcs with better names
e.g., True -> '#t  instead of
      True -> "#t" for a flat-named-contract
2013-04-05 16:56:50 -04:00
Vincent St-Amour
fe83da9bdf Eliminate intermediate lists. 2013-04-05 16:47:11 -04:00
Vincent St-Amour
f10e1fd58d Avoid duplicate work. 2013-04-05 16:47:11 -04:00
Vincent St-Amour
d3507c4c3e Preserve source location for struct constructor contracts. 2013-04-05 16:47:11 -04:00
Vincent St-Amour
ad9de1f325 Error message typo. 2013-04-05 16:47:11 -04:00
Ryan Culpepper
1d04ce2069 move unstable/redex to unstable/gui/redex to fix dist-specs
Also, don't use unsupported unicode chars.
(Should these be added to latex renderer?)
2013-04-05 16:01:50 -04:00
Robby Findler
cfe3a7d5bf Separate out mrlib/terminal from the rest of mrlib, dependencieswise
The mrlib/terminal library fits in the mrlib collection in that it is
a random library that uses our GUI system that doesn't belong in
racket/gui somewhere.

It also doesn't really fit into the framework as the framework is
supposed to be a colleciton of useful mixins for our racket/gui
classes.

It does, however, benefit from using the framework (and the string
constants library) so the best option seems to be to think of mrlib as
consisting of separate libraries that fit into two different layers
of the dependency hierarchy. So that's what this commit does.
2013-04-05 10:22:33 -05:00
Robby Findler
117819a5c9 Revert "adjust dependencies to allow mrlib/terminal to use the framework"
This reverts commit aa29fe01a8.

This change merges too much stuff into a high layer of the dependency structure
2013-04-05 10:22:33 -05:00
Robby Findler
e34e63b323 add support for updating packages via
drracket's "install package" menu item

It will infer whether to use 'raco pkg update' or
'raco pkg install' based on the currently installed
set of packages (but, of course, the details
section of the dialog lets you override this inference
if necessary)
2013-04-05 10:22:33 -05:00
Robby Findler
e3b580c200 add installed-pkg-names 2013-04-05 10:22:33 -05:00
Robby Findler
eb7c5ad84c add edit|copy and edit|select all menu items to mrlib/terminal frames 2013-04-05 10:22:33 -05:00
Eli Barzilay
26273db266 Avoid output in ftp tests.
Also add a note explaining why the output is not tested.
2013-04-05 02:23:43 -04:00
Eli Barzilay
6149134011 Misc improvements to net/dns' and net/private/ip'.
* Some racketisms.

* Use explicit `in-list' etc in for loops.

* Remove some redundant requires from `net/dns'.

* Move all tests to `tests/net', including a new `tests/net/ip'.  In the
  future there's a plan to have things like stripped zos etc for
  distribution, but we're not there yet, and the net collection is
  already organized nicely so this also makes it more uniform.

* Include the dns tests in the main test file.
2013-04-05 02:23:43 -04:00
Burke Fetscher
d00099dbdb Redex: pass language id through for term errors 2013-04-04 22:59:14 -05:00
Robby Findler
aa29fe01a8 adjust dependencies to allow mrlib/terminal to use the framework
Not sure if this is the right fix, but hopefully it will allow
the build to happen while we debate the right fix.
2013-04-04 22:04:12 -05:00
Burke Fetscher
4410ecceb2 Redex: fix term-let/#:lang keyword interaction
Account for the fact that define-language bindings may get
shadowed by term-let when using the same identifier as the language.
2013-04-04 20:38:08 -05:00
Asumu Takikawa
8483a1493f Fix the returned type of dns-get-mail-exchanger. 2013-04-04 16:11:28 -04:00
Asumu Takikawa
35e791be4e Adjust type for dns-get-address 2013-04-04 16:11:28 -04:00
Claire Alvis
04f535cadc Default implementations are only reached in the absence of method tables. 2013-04-04 15:31:51 -04:00
Vincent St-Amour
16a75761b0 Make TR-generated identifiers have the same name as original identifiers.
Makes error messages nicer, and makes it easier to correlate with source code.
2013-04-04 15:31:51 -04:00
Vincent St-Amour
ff3d785da2 Use locations from typed identifiers for type-generated contracts. 2013-04-04 15:31:51 -04:00
Vincent St-Amour
459c731bb9 Have Optimization Coach report unsound float division missed optimizations. 2013-04-04 15:31:50 -04:00
Asumu Takikawa
02989b23a1 Fix ipv4 check on addresses with a leading 0 2013-04-04 14:03:23 -04:00
Asumu Takikawa
0b55cf3df2 Refine contract check 2013-04-04 14:03:23 -04:00
Asumu Takikawa
e62bb05f05 Fix equality check 2013-04-04 14:03:23 -04:00
Asumu Takikawa
f904bd8ba5 Make IP addresses immutable 2013-04-04 14:03:23 -04:00
Ryan Culpepper
ffa589116f added unstable/redex with useful typesetting (rewriter) helpers 2013-04-04 13:28:01 -04:00
Ryan Culpepper
516f56fc83 added with-eval-preserve-source-locations to scribble/eval
Makes it possible to show examples of redex term->pict, etc.
2013-04-04 13:28:01 -04:00
Asumu Takikawa
92102a2f07 Use net/private/ip in net/dns
This simplifies the code by outsourcing IP
address functionality to net/private/ip.
2013-04-04 13:05:56 -04:00
Asumu Takikawa
4e76ae8c11 Add an IP address library
The library currently lives in a private subfolder so
that the interface can still be changed. The idea is to
eventually make it a top-level `net` library once it is
more mature.
2013-04-04 13:05:56 -04:00
Robby Findler
8246d073c0 adjust the package installation menu item in drracket to use mrlib/terminal 2013-04-04 11:10:30 -05:00
Eric Dobson
94861becd0 Fix untested contract generation code.
Closes PR 13449.
2013-04-04 08:29:15 -07:00
Eric Dobson
76de4d3cca Fix tc-apply to correctly generate expected ValueDots filters.
Closes PR 13649.
2013-04-04 07:45:15 -07:00
Eric Dobson
2b8efd6676 Fix contracts in TR. 2013-04-04 07:43:08 -07:00
Eric Dobson
17b9ed0a75 Fix prefix-of.
Closes PR 13448.
2013-04-04 07:42:45 -07:00
Eric Dobson
5ec7401f1f Add example of (List t ... bound).
Closes PR 11903.
2013-04-04 07:41:53 -07:00
Eric Dobson
c295608282 Add doc for #:no-optimize.
Closes PR 13001.
2013-04-04 07:41:53 -07:00
Vincent St-Amour
d00a579c5a Document not yet fixed optimizer bugs found using random testing. 2013-04-04 10:05:53 -04:00
Vincent St-Amour
a50d9bad7e Avoid unsound optimization for complex division.
Found using random testing.
2013-04-04 10:05:53 -04:00
Jay McCarthy
0003b737bd Doctrinal purity 2013-04-04 07:38:57 -06:00
Jay McCarthy
d630a09247 Add xrefs and advice re Robby 2013-04-04 07:38:57 -06:00
Jay McCarthy
2bd19d1604 Add xrefs and advice re Robby 2013-04-04 07:38:57 -06:00
Jay McCarthy
0cbf694468 Fixing error with uninitialized packages 2013-04-04 07:38:57 -06:00
Jay McCarthy
9df0c7c7b0 Changing breadcrumbs 2013-04-04 07:38:57 -06:00
Jay McCarthy
6a4af88d6a Setting up the conflict detection framework 2013-04-04 07:38:57 -06:00
Jay McCarthy
cd0e0266e2 Starting to store and display curation information 2013-04-04 07:38:57 -06:00
Robby Findler
13d7cc1184 fix careless error 2013-04-04 07:36:33 -05:00
Robby Findler
ecf2b16bf0 refactor the plt installation code in drracket to pull out
the GUI wrapper around command-line like utilities
2013-04-03 22:23:26 -05:00
Robby Findler
15abd8f9dd remove unused require 2013-04-03 22:23:26 -05:00
Eli Barzilay
af027020ba Adjust tests to x' instead of ×'. 2013-04-03 19:53:58 -04:00
Eli Barzilay
8ffd887847 Test for being able to customize struct printouts. 2013-04-03 18:10:22 -04:00
Eli Barzilay
448a62eae4 Avoid non-ascii character in numeric formats. 2013-04-03 18:10:22 -04:00
Danny Yoo
6e32a25253 Defensively check pos before subtraction in module-reader.rkt. 2013-04-03 14:26:16 -06:00
Eric Dobson
04ef9db1b3 Turn dynamic-requires into lazy-requires in TR.
Closes PR 13621.
2013-04-03 09:49:40 -07:00
Eric Dobson
6c2e75ac7e Make +,*,min,max support precise unary types.
Closes PR 13563.
2013-04-03 09:33:02 -07:00
Eric Dobson
0e0f1cd670 Adds subtyping for filters, and fixes -FS to be more precise.
Closes PR 12817.
2013-04-03 09:25:28 -07:00
Robby Findler
cce76eba00 fix bug in untar when unpacking a tar file with top-level files 2013-04-03 10:18:02 -05:00
Robby Findler
77a1b55c32 hide the testing of the close parens with an edit-sequence 2013-04-02 21:26:43 -05:00
Robby Findler
944602440c add response/output 2013-04-02 21:26:32 -05:00
Vincent St-Amour
ffc90239d0 Fix test for new complex division. 2013-04-02 17:32:29 -04:00
Tony Garnock-Jones
c5df74f662 Show the offending value when a TR-introduced Any contract fails 2013-04-02 16:29:11 -04:00
Tony Garnock-Jones
f2616b934c Avoid stripping location information from syntax object in warning message. 2013-04-02 16:29:11 -04:00
Vincent St-Amour
b808d2809e Fix optimization on exp of complex numbers.
Found using random testing.
2013-04-02 16:29:11 -04:00
Vincent St-Amour
8948388ec5 Fix another unsafe optimization of unsafe-fxmodulo.
Found using random testing.
2013-04-02 16:29:10 -04:00
Vincent St-Amour
f66ee7088f Fix type of tanh.
Found using random testing.
2013-04-02 16:29:10 -04:00
Vincent St-Amour
ed12b64bf7 Fix type of sinh.
Found using random testing.
2013-04-02 16:29:09 -04:00
Vincent St-Amour
51c94e26d3 Increase timeout for TR random tester. 2013-04-02 16:29:09 -04:00
Vincent St-Amour
6e10dd6a4d Imitate untyped division more closely.
Found using random testing.
2013-04-02 16:29:08 -04:00
Vincent St-Amour
5f9bcbca49 Abstract unboxing of complex division. 2013-04-02 16:29:08 -04:00
Vincent St-Amour
ca63915693 Fix coercions from single-floats to floats.
Found using random testing.
2013-04-02 16:29:07 -04:00
Vincent St-Amour
77b89fab99 Reimplement unboxing of complex division.
Add special cases to be consistent with untyped Racket.

Found using random testing.
2013-04-02 16:29:06 -04:00
Eric Dobson
3d49087ea3 Fix parsing of dotted rest when there is an expected type.
Closes PR 13646.
2013-04-01 22:17:32 -07:00
Robby Findler
5669c372b2 fix a docs bug
(and change a case-lambda to a regular lambda)
2013-04-01 22:39:22 -05:00
Robby Findler
5a85af78ac add contracts to the "with-" macros in redex/pict 2013-04-01 22:39:21 -05:00
Vincent St-Amour
c8c6341970 Simplify type. 2013-04-01 14:44:32 -04:00
Vincent St-Amour
92c4c70e7a Fix type of lcm.
Found using random testing.
2013-04-01 14:44:32 -04:00
Vincent St-Amour
70a8b79d0e Re-enable testing of hyperbolic trigonometry functions. 2013-04-01 14:44:31 -04:00
Vincent St-Amour
990fa87a2e Add random testing for complexes.
Fix a bug it found.
2013-04-01 14:44:31 -04:00
Vincent St-Amour
ca2e6bd769 Sometimes generate random integers. 2013-04-01 14:44:31 -04:00
Vincent St-Amour
3e9595e910 Factor out grammar to generate well-typed terms with higher probability.
Allows us to test integer-specific functions.
2013-04-01 14:44:31 -04:00
Vincent St-Amour
f7e8b090e6 Fix types of bitwise-and and bitwise-xor.
Found with random testing.
2013-04-01 14:44:31 -04:00
Matthias Felleisen
ab663b4833 bring code to old state, make consistent with docs, Closes PR 13642 again 2013-04-01 12:10:27 -04:00
Matthew Flatt
b78982fe6a racket/cmdline: fix problem with arity checking
Extra normalization due to 59b1e32fe9 exposed the bug.
2013-03-31 20:29:23 -06:00
Eric Dobson
5d8f470e0b Remove dependency on GUI libraries. 2013-03-31 11:43:08 -07:00
Eric Dobson
eeeceedb8c Reimplement for*/list: in TR so that it works.
Closes PR 13253.
2013-03-31 10:40:21 -07:00
Eric Dobson
b637c24d88 Improve type of expt since inference is bad.
Closes PR 13383.
2013-03-31 10:39:36 -07:00
Eric Dobson
ecec724747 Add testcase for sibling modules.
Closes PR 13155.
2013-03-31 10:39:16 -07:00
Carl Eastlund
df00bbb194 Updated contracts for arity-related functions.
Added contract checking to arity=?, arity-includes?, and normalized-arity.
Removed contract checking from normalize-arity to make it a total predicate.
Updated documentation for normalize-arity to reflect this change.
2013-03-31 13:36:07 -04:00
Carl Eastlund
f509420662 Removed unnecessary duplication of normalize-arity. 2013-03-31 13:36:06 -04:00
Carl Eastlund
aaa99d565d Documented normalized-arity?, arity=?, and arity-includes?. 2013-03-31 13:36:06 -04:00
Carl Eastlund
636f8a91dc Moved normalized-arity?, arity=?, and arity-includes? into racket/function. 2013-03-31 13:36:06 -04:00
Carl Eastlund
4dd011aa09 Added documentation for normalize-arity. 2013-03-31 13:36:05 -04:00
Carl Eastlund
e356c660ea Re-provide normalize-arity from racket/function. 2013-03-31 13:36:05 -04:00
Carl Eastlund
59b1e32fe9 Changed normalize-arity to coalesce arity-at-least with adjacent numbers.
For instance, (normalize-arity (list 1 (arity-at-least 2))) now produces
(arity-at-least 1).  The implementation and the tests for normalize-arity both
reflect this change.  The randomized tests now also check that the output
represents the same arity as the input.
2013-03-31 13:36:05 -04:00
Matthew Flatt
6e40caa7e2 ffi/com: repairs, including `mysterx' compatibility
Restore MysterX-style handling of parameterzied properties in
`com-get-property'.  It turns out that the original `com-get-property'
handles parameterized properties by allowing a list in place of a
property-name string, and that handling got lost in the re-write.

Fix the name of `com-get-active-from-from-coclass'.

Fix arity checking for optional arguments.

Closes PR 13603
Closes PR 13604
2013-03-31 11:12:45 -06:00
Matthew Flatt
2412611c07 file/untgz: allow extra bytes after tar content
Closes PR 13641
Closes PR 13644
2013-03-31 07:29:06 -06:00
Matthew Flatt
e93f977603 file/untar: handle unknown extensions by skipping
Also, add/improve logging.
2013-03-31 06:59:12 -06:00
Matthew Flatt
bfc9c41358 racket/gui: double-check size on attmpt to set editor scroll
A scroll request could fail if a resize notification is still
in flight (i.e., queued but not yet executed), so double-check
the size on a scroll request.

Closes PR 13582
2013-03-31 06:39:49 -06:00
Matthew Flatt
0a482b6159 raco setup: fix doc dependency check for PLTCOMPILEDROOTS
A doc build depends on its source's ".zo" file, which might
not be next to the source due to a PLTCOMPILEDROOTS setting.

Closes PR 13640
2013-03-30 17:28:25 -06:00
Matthias Felleisen
1ff3e3b942 fixed rate argument for run-movie, Closes PR13642 2013-03-30 18:07:00 -04:00
Carl Eastlund
68f526c2ed source-location-known? should not rely on "span" field 2013-03-30 16:17:27 -04:00
Ryan Culpepper
bace16a4ce added test for sequence syntax with keywords 2013-03-30 10:00:44 -04:00
Ryan Culpepper
d71cc04c22 fix show-dependencies handling of submodules 2013-03-30 10:00:44 -04:00
Ryan Culpepper
3dfab4d0aa factor out create-ehpat code 2013-03-30 10:00:44 -04:00
Ryan Culpepper
1b729d34d8 added rename option to lazy-require
closes PR 13624

also added examples
2013-03-30 10:00:44 -04:00
Ryan Culpepper
2eae24b0b1 use defform #:grammar 2013-03-30 10:00:44 -04:00
Ryan Culpepper
293b208af7 added optional #:grammar clause to defform, etc 2013-03-30 10:00:44 -04:00
Asumu Takikawa
ceac0d3a87 Scheme -> Racket 2013-03-29 17:55:10 -04:00
Matthew Flatt
ba270cde48 fix over-eager "optimization" of some unsafe-fx operations
As reported by Vincent.
2013-03-29 14:46:19 -06:00
Robby Findler
06315bf0fa syntax error check fix
closes PR 13639
2013-03-29 11:58:52 -05:00
Matthew Flatt
99453ac506 ffi/unsafe/objc: weaken cache of method-invoke functions
A non-weak table meant that on Cocoa, every key press leaked a
foreign-funciton stub.
2013-03-29 08:09:57 -06:00
Matthew Flatt
8e25f42fbc doc repair
Closes PR 13555
2013-03-29 07:23:50 -06:00
Matthew Flatt
70eb426aa4 contract error: shift path normalization to error time
Making a pathcollects-relative  at contract-formation time means a
lot of extra work then and a change to the needed sandbox permissions.
Aormalizing at error time is more consistent with other parts of a
contract message.
2013-03-29 07:23:50 -06:00
Matthew Flatt
3f7fcdf1b7 reference: doc clarifications on `guard-evt' 2013-03-29 07:23:49 -06:00
Matthew Flatt
5afd1b4118 syntax-color/racket-lexer: update for single-precision and extflonums
Includes a doc fix to note `+inf.t', etc.
2013-03-29 07:23:49 -06:00
Matthew Flatt
1dcc7ca4dc syntax-color/racket-lexer: fix long-standing number-parsing bug
The lexer mishandled cases like "#x1E+2", because "E" is
not an exponent marker for hexadecimal --- and it has been that
way forever, but the repair isn't all that difficult.
2013-03-29 07:23:49 -06:00
Matthew Flatt
f1ebb6136b reference: fix for reader's number grammar 2013-03-29 07:23:49 -06:00
Matthew Flatt
45f74eafe5 scriblib/footnote: fix for non-Latex output
Also, fix warnings generated even for Latex mode.
2013-03-29 07:23:49 -06:00
Greg Hendershott
59bba2d197 Combine adjacent code spans into one.
These result from something like

    @racket[(x y)]

being treated by Scribble as multiple RktXXX items rather than one. As
a result the Markdown emitted was:

    `(``x`` ``y``)`

But obviously instead we want:

    `(x y)`

Kludgosity alert: Although it would probably be more-correct to
consolidate the RktXXX items at the Scribble structure level, I don't
easily see how. `@racket` is baking in the concept of Racket
lexing (classifying text as various kinds of Racket elements). This is
handy when the render will be HTML or Latek, and is benignly N/A when
it will be plain text. But it's a bit square-peg/round-hole when the
render will be Markdown. Rather than attempt to "un-lex" the Scribble
structures (I'm having trouble seeing how), I'm handling it
"after-the-fact" -- adjusting the generated Markdown text.

If anyone thinks the preceding is an elaborate rationalization for an
ugly kludge, I wouldn't argue, but I would need some help
understanding the preferable way to go about it.
2013-03-29 07:23:49 -06:00
Greg Hendershott
a5f6686270 Fix problem handling examples and interaction.
Unlike plain `racketblock`, `examples` and `interaction` are
"nested". As a result we emitted bad Markdown like:

    ```racket
    Examples:
    ```racket
    some-code
    ```
    ```

Markdown code blocks can't nest, so this needs to be:

    ```racket
    Examples:
    some-code
    ```

Also: Updated the unit test with examples of `examples` and
`interaction`.
2013-03-29 07:23:49 -06:00
Matthew Flatt
a5f8584bab scriblib/figure: add `#:continue?' option 2013-03-29 07:23:49 -06:00
Jay McCarthy
7b832edae9 Adding pointer to dispatcher concept 2013-03-28 08:45:03 -06:00
Jay McCarthy
8a3f831807 Fixing standalone 2013-03-28 08:45:03 -06:00
Matthew Flatt
325a9dd34b slideshow/pict: allow a color in a style for `text' 2013-03-27 17:17:33 -06:00
chrdimo
a499b22a3c improving performance of options 2013-03-27 16:16:25 -04:00
Carl Eastlund
1d351858f9 Used syntax/modcode in rackunit/docs-complete.
This simplifies the implementation, and also generalizes it so that it finds
documentation from installed packages, linked collections, and other sources.
2013-03-26 19:50:33 -04:00
Jay McCarthy
169a9ea28d Fixing broken rackunit display tests 2013-03-26 06:08:21 -06:00
Jay McCarthy
875c20119d Generalizing define-bibtex-cite 2013-03-26 06:08:21 -06:00
Robby Findler
0c5fa7d6c5 relax sandbox permissions now that contract error message
construction requires looking at the filesystem

assuming this is the right fix, it closes PR 13634
2013-03-26 00:03:34 -05:00
Robby Findler
55ef0e7c07 make negative blame also use "<collects>/" instead of having
the full collection path in there
2013-03-25 21:04:21 -05:00
Robby Findler
2ec097a955 fix bug in drracket's online check syntax renaming setup
Because of a limitation in our GC tech (and because I have not
sorted out how to program around it (which should be possible))
when the "is it safe to rename this variable" check may silently
just say "yes" when it really doesn't know the correct answer.

It turns out that this was happening on every attempt to rename
after the first one (in a given online check syntax run) due to
a bug, now fixed in this commit (the "loop" didn't actually loop...)

Also, moved the creation of the thread to its own function to
make the things it closes over more syntactically apparent.
2013-03-25 21:04:20 -05:00
Danny Yoo
eb7fa6f066 Sanitize the output from HTML escape characters.
Noted by ozzloy on IRC.  The search page appears to fail when
searching for the term 'string<?'; in truth, the search succeeds, but
the search link-printing code doesn't escape the '<?' part of the
identifier.
2013-03-25 12:51:19 -06:00
Eric Dobson
38409e0d7e Add descriptions to for: syntax classes.
Closes PR 13284.
2013-03-25 09:42:29 -07:00
Eric Dobson
d7f12d93f4 Add testcase.
Closes PR 12812.
2013-03-25 08:50:48 -07:00
Eric Dobson
f3fdd5c1d7 Call raise-argument-error correctly. 2013-03-25 08:49:42 -07:00
Jay McCarthy
5bb51aff4c Support all define-cite options in define-bibtex-cite 2013-03-25 08:27:51 -06:00
Jay McCarthy
b3b10a39f5 Support mastersthesis, clarify docs, and add test of rendering 2013-03-25 08:27:51 -06:00
Matthew Flatt
4d76aa2040 place channels & threads: improve GC
Allow a thread to be GCed when it is blocked on a place
channel for reading and the place channel's write end
is inaccessible.

GC is limited to threads that do not participate in cycles
of such threads, where the otherwise unerachable threads
are blocked on place channels that are reachable among the
set of threads. In other words, the GC finds the greatest
fix point (as measured by the threads to retain) instead of
least fix point --- which isn't what you want, but finding
the least fix point seems to require significant extra GC
machinery across places.

This improvement was intended to solve the same problem as
commit 7b0608c, but that case seems to run into the limitation
on cycles.
2013-03-25 05:15:24 -06:00
Matthew Flatt
b34fac32c0 fix space-safety problem
A tail call with certain kinds of primitives would fail to
clear local bindings in a detectable way. For example, a
tail call to `sync' that blocks could retain references
to unreachable data in the context of the `sync' call.

Primitives that can cause problems in the run-time system
are already identified as "imemdiate" primitives. The
safe-for-space pass now inserts clearing actions before a tail
call, unless the call it to a known immediate primitive or a
Racket-implemented function.

Clearing operations are now omitted before non-tail calls
to immediate operations like structure predicates.

The newly added clearing operations could affect performance,
but they probably won't, since the clear operations are still
avoided in tail-call cases that are otherwise fast. The newly
omitted clearing operations may improve performance.
2013-03-25 05:15:24 -06:00
Matthew Flatt
c3266ef685 fix `sync/[timeout/]enable-break' semaphore shortcut
The shortcut could be triggered in a bad case (first
argument as `#f' in non-timeout mode) and returned the
wrong result (void instead of the semaphore).
2013-03-25 05:15:24 -06:00
Matthew Flatt
b041a151e6 racket/gui: fix auto-scrollbars for editor GUI
It's possible to go from a state where one scroll bar is needed
(vertical or horizontal) to a state where each scrollbar is
needed iff the other scrollbar is needed. In that case, the
auto-scrollbar algorithm couldn't find either fixpoint and
would loop forever.
2013-03-25 05:15:24 -06:00
Eric Dobson
87facb736f Check for structure binding and raise good error if it is not there.
Closes PR 13588.
2013-03-24 18:35:22 -07:00
Eric Dobson
bb0b071f38 Remove legacy require/typed form. 2013-03-24 18:35:21 -07:00
Robby Findler
7b0608ca42 fix a leak in DrRacket
It was leaking threads at about the rate of 2 per online expansion
that had a syntax error (or otherwise aborted without finishing
expansion)
2013-03-24 18:03:33 -05:00
Robby Findler
5937bcbbf5 fix a race-condition 2013-03-24 17:05:50 -05:00
Robby Findler
57f857b45a fixed more calls to error (that should be raise-argument-error) in the contract library 2013-03-24 08:09:08 -05:00
Robby Findler
64849bddd2 update mzlib contract test suite to recent changes to racket/contract 2013-03-24 07:24:32 -05:00
Robby Findler
6e4d483403 adjust contract library to call raise-argument-error instead of error
and a few other changes nearby to clean up various things

closes PR 13623
2013-03-23 22:00:29 -05:00
Eric Dobson
0e42a791a7 Typecheck (lambda args body) as (arg1 -> result). 2013-03-23 13:18:05 -07:00
Eric Dobson
8d080b74cb Fix Struct-Type-Property.
Closes PR 13593.
2013-03-23 08:24:05 -07:00
Carl Eastlund
4ebf53e919 Add error checking to ensure blame-source produces a srcloc? as documented. 2013-03-23 01:06:25 -04:00
Carl Eastlund
c8f79dacbb Added tests for blame object source locations being srcloc structs. 2013-03-23 01:06:24 -04:00
Burke Fetscher
fe0fd0d152 Redex: remove some now extraneous code 2013-03-22 16:14:03 -05:00
Burke Fetscher
ddf4945125 Redex: corrections for disequations in generator
- handle parameters correctly when simplifying disequations
- rework term generation/disequation checking for parameters
- fix define-extended-metafunction w/r/t the above
2013-03-22 15:28:36 -05:00
Burke Fetscher
40fc96cacf Redex: rework metafunction compilation/search for parameters 2013-03-22 15:28:35 -05:00
Burke Fetscher
bdf1866e80 Redex: parameterized disequations
refactor the pattern unifier and tests to handle
disequations with parameters correctly
2013-03-22 15:28:35 -05:00
John Clements
564d244039 polarity flip in type error messages 2013-03-22 10:20:40 -07:00
Eli Barzilay
f1e5bd8fd4 Undo no-op change.
As discussed:
  http://lists.racket-lang.org/users/archive/2013-March/056907.html
2013-03-22 11:22:49 -04:00
Eli Barzilay
9f057857e5 Fix props order. 2013-03-22 11:21:04 -04:00
Jay McCarthy
04d723eea8 Fixing broken rackunit tests 2013-03-22 07:45:14 -06:00
Jay McCarthy
9f337c632a Removing the planet2 name from the code 2013-03-22 07:45:14 -06:00
Robby Findler
431efb40d1 Argh, sorry again.
Revert "IN PROGRESS: working on syntax error messages for 2d"

This reverts commit 04ada66741.
2013-03-21 22:48:47 -05:00
Robby Findler
04ada66741 IN PROGRESS: working on syntax error messages for 2d 2013-03-21 22:48:05 -05:00
Robby Findler
092d98656c fix plai/gc2/mutator for the case where a lambda-bound
variable is shadowing something
2013-03-21 22:48:05 -05:00
Robby Findler
0e6975fb2c add 'values' to plai/gc2/mutator language 2013-03-21 22:48:05 -05:00
Robby Findler
13bcb73050 typo in test suite 2013-03-21 18:59:23 -05:00
Tony Garnock-Jones
0399babc85 pretty-format returns a String, not Void 2013-03-21 18:11:28 -04:00
Matthew Flatt
3886b7702e fix for `syntax-local-value/immediate'
The source locaiton on the second result was mangled.

Closes PR 12477
2013-03-21 14:29:40 -06:00
Robby Findler
f166934700 adjust check syntax to deal properly with submodules at non-zero phases
Thanks to Matthew for sorting this out.

(Also removed a bunch of line-ended space chars since git
yelled at me.)
2013-03-21 13:08:34 -05:00