Commit Graph

4753 Commits

Author SHA1 Message Date
Robby Findler
4571afa6ab speed up the test-engine drracket tests some 2012-08-31 20:52:48 -05:00
Robby Findler
6ca79d56fa fix check-error so it compares the rewritten error messages,
not the raw error messages
2012-08-31 20:52:48 -05:00
Matthew Flatt
9cfcf8911c fix `in-directory' to properly propagate filesystem errors 2012-08-31 16:07:10 -06:00
Sam Tobin-Hochstadt
eed93825ab Track mutable variables across modules. 2012-08-31 17:45:11 -04:00
Sam Tobin-Hochstadt
ab5403d1ed Simplifying case-> to union is only safe for 1-argument functions.
Closes PR 13002.
2012-08-31 10:27:51 -04:00
Ryan Culpepper
70a2ced71a syntax/id-table: simplify use of chaperones 2012-08-29 20:44:04 -04:00
Ryan Culpepper
3ccc93590a syntax/id-table: more work on *-id-table/c 2012-08-29 20:43:24 -04:00
Eric Dobson
e7c7e14485 Added tests to idtbl/c and fixed revealed bugs. 2012-08-29 20:25:32 -04:00
Matthew Flatt
b61f3f751c port position-tracking clean-ups
Add `file-position*', which can return #f instead of raising
an exception when a port's position is unknown. Change
`make-input-port' and `make-output-port' to accept more
kinds of values as the initial position.

These changes make it possible to synchronize a port's
position with a `port-commit-peeked' action. It's ugly,
which I think reflect something broken about position
tracking in the port protocol (which seems difficult to fix
without breaking compaibility).
2012-08-28 16:04:41 -06:00
Asumu Takikawa
466b4e2c60 racket/generic: eliminate ctc dependency in private interface
Closes PR 13051
2012-08-28 17:54:35 -04:00
Matthew Flatt
763882f651 add port shortcut for `make-{input,output}-port'
Providing a port instead of a reading or writing procedure
redirects the read/write to the specified port. This shortcut
is kind of a hack, but the run-time system can easily streamline
the redirection when it's exposed this way.

Using the new redirection feature reduces overhead in
`with-output-to-bytes' and `pretty-print'.
2012-08-28 08:54:26 -06:00
Matthew Flatt
cb95a99d68 change `transplant-{input,output}-port' to propagate buffering
Affects derived functions, such as `dup-output-port' and
`relocate-output-port', and uses in `pretty-print'.
2012-08-27 19:44:06 -06:00
Matthew Flatt
704cb4bd01 make-output-port': fix enable-break?' argument to callbacks 2012-08-27 19:44:06 -06:00
John Clements
614ff235fc remove dependencies on mz-testing.rkt 2012-08-27 13:35:38 -07:00
Ryan Culpepper
7da5063782 db: added variations of concurrency test 2012-08-25 19:02:18 -04:00
Ryan Culpepper
7c395e9c7c db: updated to new error convention (mostly) 2012-08-25 19:02:18 -04:00
Ryan Culpepper
325293ceea added tests for racket/syntax 2012-08-24 18:14:40 -04:00
Matthew Flatt
bd8e1e8b1f fix JIT bug related to bad struct-field mutators
We can't disallow the creation of bad mutators without breaking
old code, but we can prevent the JIT from treating them like
good ones.

Closes PR 13062
2012-08-24 15:48:58 -06:00
Robby Findler
0fa2e6d7d5 adjust planet tests to use 'raco planet' command-line tool, not 'planet' 2012-08-24 07:41:05 -05:00
Robby Findler
1ad2c75531 add the ability to specify #:parent to struct/dc (and fix struct/c to use it)
closes PR 13049
2012-08-23 18:59:11 -05:00
Matthew Flatt
edd2035f88 racket/draw: fix set-clipping-rect' in record-dc%' 2012-08-23 09:42:34 -06:00
Asumu Takikawa
07119c371d Fix stream bug introduced by generics
Stream generic operations stopped working for lists
since the operations used only the generic dispatcher
instead of the real generic functions.

(Moral of this story: write more tests)
2012-08-22 18:15:25 -04:00
Sam Tobin-Hochstadt
b7f9c77069 Remove #:transparent to work around place message limitations. 2012-08-22 16:50:50 -04:00
Sam Tobin-Hochstadt
e207f5c67d Add -v option to TR tests.
Also, print errors from serialization and place message sending.
2012-08-22 16:50:50 -04:00
Eric Dobson
e9f209977b Fix typechecking of polymorphic structs with parent types.
Closes PR12998.
2012-08-22 16:50:49 -04:00
John Clements
a5ddd73000 removed vestigial mz-testing file 2012-08-22 10:14:13 -07:00
Sam Tobin-Hochstadt
26a57f6420 Use module registry trick to slightly speed up TR tests. 2012-08-22 11:13:07 -04:00
Sam Tobin-Hochstadt
e705d4d450 Parallelize running Typed Racket optimizer tests.
No speedup yet, though.
2012-08-21 17:47:30 -04:00
Asumu Takikawa
9a65f9aaf0 Delete trailing whitespace 2012-08-21 16:20:26 -04:00
Asumu Takikawa
965a74453f Add #:forall, #:∀ to contract-out 2012-08-21 16:20:26 -04:00
Asumu Takikawa
a5d1007696 racket/generic: allow impersonator contracts
This enables the use of polymorphic contracts with generic
interfaces and their instances.
2012-08-21 12:43:48 -04:00
Matthew Flatt
5e5e503859 scribble/manual: add #:normalize?' option to deftech' et al. 2012-08-20 17:37:24 -06:00
Jon Rafkind
5bf68d32d5 [honu] remove context argument 2012-08-20 16:25:38 -06:00
Sam Tobin-Hochstadt
1c275ffcc7 Don't use places for running single tests. 2012-08-20 14:45:50 -04:00
Jon Rafkind
dc3d06c7ae [honu] change -> to = 2012-08-20 12:28:15 -06:00
Jon Rafkind
62042beb50 [honu] wrap syntax with (semicolon ...) when a ; is present 2012-08-20 12:28:15 -06:00
Eric Dobson
533920480e Add tests for make-predicate and cast, also add support for the top-level.
Closes PR 12939.
Closes PR 12201.
2012-08-20 12:39:41 -04:00
Sam Tobin-Hochstadt
9e5060ef5b Make Typed Racket integration tests run in parallel.
Parallel speedup of approximately 4x when using 8 workers on a 12-core machine.

Closes PR 12911.
2012-08-20 12:25:50 -04:00
Eric Dobson
09d32d35e0 Add promise support to type->contract.
Closes PR13024.
2012-08-20 10:10:17 -04:00
Robby Findler
40121d2531 improve the menu redundancy test so it reports when there are
multiple menu items with the same shortcut
2012-08-19 17:09:16 -05:00
Robby Findler
52f18ee370 adjust the expansion of class so that it tracks identifiers
that it drops from the expansion (like define/public) by
adding them to the origin syntax property (and sometimes
to disappeared-use; see the add-decl-props function
for details on those that aren't in the origin property)

this means that check syntax will now pick them up
so they'll show up in the blue boxes in drracket

Thanks Matthew, for some helpful advice and
comments on an initial version of the commit.
2012-08-17 17:24:03 -05:00
Asumu Takikawa
5a2c235739 Forge non-existent generic functions like write-proc
Closes PR 13014
2012-08-17 12:27:01 -04:00
Matthew Flatt
3150b31eb7 bytecode optimizer improvement
Generalize splitting of `(let-values ([(x ...) (values e ...)]) ....)'
to `(let ([x e] ...) ....)' for any `e', since it's always equivalent.
Right?

(The old requirements on the `e's seem to be needed only for
`letrec-values' splitting and maybe mutable variables.)
2012-08-16 16:39:21 -06:00
Matthew Flatt
0452bd791d bytecode optimizer improvement
Treat unsafe functional operations (which never raise an
exception) as omitable, which means that simple `let-values'
combinations can be split into `let' bindings, etc.
2012-08-16 13:11:41 -06:00
Matthew Flatt
65588b156b fix `sqrt' on numbers with negative real and inexact-zero imag
Closes PR 13028
2012-08-16 04:46:01 -06:00
Matthew Flatt
b95b1b9366 Revert "Fixing Rackunit tests after alignment"
This reverts commit 4497c8ce5e,
because the tests were correctly reporting a bug that I
introduced.
2012-08-15 09:34:17 -06:00
Matthew Flatt
6e2bb58cce add a #:fill' clause to for/vector' et al. 2012-08-15 09:32:55 -06:00
Matthew Flatt
7b811bed1b for/vector' and for*/vector' repairs
Closes PR 13029, 13030
2012-08-15 07:41:50 -06:00
Jay McCarthy
4497c8ce5e Fixing Rackunit tests after alignment 2012-08-14 22:21:44 -06:00
Jay McCarthy
3ddaf5e32b Fixing Racklog cut error found by Erik Dominikus
Basically, Racklog (and all versions of schelog) implement ! by
causing the failure continuation of the entire relation being
returned. They did not also cause the unification caused by the
relation to be un-done.

However, it is not easy to separate un-doing the local changes because
the unification just returns a failure continuation too. I had to call
that fail continuation but use state to communicate to its target that
the next clause should not be visited.

I don't know if this is correct. My test suite contains a lot of cut
tests that still pass. Erik's test passes too. But I'm not confident
that this really works.
2012-08-14 21:34:02 -06:00
Eric Dobson
ac493a6f44 Replaced infer-dummy with lazy-require. 2012-08-14 16:04:51 -04:00
Sam Tobin-Hochstadt
ade36c36c6 Don't special-case applications with instantiations.
Closes PR 13006.
2012-08-14 15:45:47 -04:00
Eric Dobson
3b6168de7d Fix substitute and add test case. 2012-08-14 14:44:55 -04:00
Eric Dobson
2e3965e777 Make simple substitution happen all at once.
Closes pr12920.
2012-08-14 14:44:55 -04:00
Vincent St-Amour
af8fc1f26a Fix types of magnitude and angle.
Closes PR13025.
2012-08-14 14:37:18 -04:00
Eric Dobson
cac47c0427 Make TR debug printer work again. 2012-08-14 09:45:01 -04:00
Matthew Flatt
23bca99ba1 adjust `local-expand' to add 'submodule property 2012-08-13 17:11:20 -06:00
Matthew Flatt
b043da6ea6 SIGHUP and SIGTERM -> exn:break:hang-up' and exn:break:terminate'
The default uncaught-exception handler calls `exit' when it receives
one of the new exceptions.
2012-08-13 17:11:20 -06:00
Sam Tobin-Hochstadt
6ae2a9d884 Fix internal require of typed submodules. 2012-08-13 17:20:20 -04:00
Robby Findler
e6fc56a8b8 adjust the leak test so that it first runs with online
compilation disabled and then runs with it enabled
2012-08-13 10:31:54 -05:00
Matthew Flatt
bb3545ddf7 ffi/unsafe/custodian: #:atexit?' -> #:at-exit?' 2012-08-12 20:25:47 -06:00
Matthew Flatt
1800680c6b racket/gui: fix access of scrollbar values for canvas without a scrollbar 2012-08-12 20:17:29 -06:00
Matthew Flatt
42ef79c2ad add `ffi/unsafe/custodian' 2012-08-12 20:17:29 -06:00
Robby Findler
6588449aed enable online check syntax (change the default for
the preferences and use a new preferences symbol, so
everyone gets the new default)
2012-08-12 16:20:21 -05:00
James Swaine
3cd4efe201 Fix process id sorting in future visualizer 2012-08-11 09:21:29 -05:00
James Swaine
6271556e1d Add GC display to future visualizer 2012-08-11 01:00:51 -05:00
Matthew Flatt
b5f0c97762 fix arity error message for keyword-accepting methods
Internally, there's a `prop:method-arity-error' property that is
used for keyword-accepting methods. The same thing could be
accomplished with `procedure->method', but the new property avoids
a wrapper. It might be nice to expose the property from `racket/base',
but that creates trouble for generating arity errors for keyword-
requiring procedures (i.e., when such a procedure is wrapped), so
keep it provate for now.

Closes PR 12982
2012-08-10 12:59:36 -06:00
Eric Dobson
3876dfa841 Make generated flat contracts actually flat. 2012-08-10 10:39:44 -04:00
Matthew Flatt
4345045b52 fix parsing of complex numbers with special single flonums
Closes PR 12839
2012-08-10 07:49:17 -06:00
Matthew Flatt
9d6cb8e50e setup/pack: fix internal and contract errors
Part of the contract-error fix is an implementation change, and part
is a documentation change.

Closes PR 12904
2012-08-10 07:49:17 -06:00
Matthew Flatt
5f120373f1 atan: fix result for two inexact-zero arguments
Closes PR 12936
2012-08-10 07:49:16 -06:00
James Swaine
a3a55de00a Don't wait for future log messages if futures are disabled (future-visualizer) 2012-08-08 12:01:58 -05:00
Eric Dobson
21598297a7 Removed *Un from abbrev.rkt, replaced it with Un from union.rkt. 2012-08-07 15:50:50 -04:00
Eric Dobson
9ed360bb5e Removed convenience.rkt from typed racket. 2012-08-07 15:50:50 -04:00
Eric Dobson
56fd9e6321 Rearange type code, so that abbrev.rkt can depend on union.rkt.
Split out base-abbrev.rkt so that subtype is not dependent on abbrev.rkt.
Remove unused code in numeric-tower.rkt so that it is now a dependent of
abbrev.rkt, which allows the body of convenience.rkt to be merged back in.
Remove special casing for union.rkt and extraneous subtyping checks.
Remove union-maker.
2012-08-07 15:50:50 -04:00
Robby Findler
4a19ab40e8 add check for adjacent separators into tests 2012-08-07 12:51:52 -05:00
Matthew Flatt
d194fa6245 fix `regexp-match' variants given a long string and an output port 2012-08-07 05:21:33 -06:00
Matthew Flatt
0bd53a3549 compiler/zo-marshal: repair mashaling of import info in syntax 2012-08-06 15:32:27 -06:00
Matthew Flatt
02318ebcb3 fix test to work with relative executable path 2012-08-06 14:27:29 -06:00
Matthew Flatt
13d7a37eb6 re-align expt' and flexpt' to match C99 pow() spec
Also, improve precision of some complex results to avoid
excessive `+nan.0's.

Closes PR 12935
2012-08-06 13:00:36 -06:00
Vincent St-Amour
7494fccc4c Control number of attempts for TR random testing from the command line. 2012-08-06 12:48:41 -04:00
Eric Dobson
e6d4fb2ee2 Fill hole in recursive type soundness. Fixes PR 11372. 2012-08-06 12:31:07 -04:00
Robby Findler
8a0b6549a5 adjust the contract error messages to follow the error message
conventions in 9.2.1 of the reference (altho the messages do
not yet do the extra level of indenting when a field is too
long, nor are there any field names ending in ...)

Also, fix the docs for the #:stronger argument to
make-contract, make-chaperone-contract, and make-flat-contract
2012-08-05 20:09:09 -05:00
Robby Findler
34618708a6 give up on a (small) part of the repl test.
Specifically, it seems like about 20% of the time (in drdr),
running the program

  (let l()(l))

in DrRacket and then clicking the break button results in a state
where DrRacket's focus is not in the definitions window. I can't seem
to make this happen on my own machine and I'm not sure if this a
race-condition in the test suite or a real bug in DrRacket but it
seems minor enough (given all of the other focus-based testing that is
happening in this (and related) test suites) that I'm just going to
give up on this particular test.
2012-08-05 08:14:58 -05:00
Matthew Flatt
7c9e6d7193 improve port progress-evt guarantees; fix for `read-bytes-evt' et al.
A progress evt from a close input port must be initially ready,
and the primitive `peek-bytes-avail!' checks a progress evt
before checking whether the port is closed.

These changes resolve a race in `read-bytes-evt' and related evt
constructors.
2012-08-04 10:19:55 -06:00
Matthew Flatt
f28e8a02d0 fix 'disappeared-use prperty added by `syntax'
Effectively preserve `syntax-original?' of added identifiers.
2012-08-04 10:19:55 -06:00
Vincent St-Amour
aba046a92d Swap unsafe and chaperone-unsafe vector ops in the TR optimizer.
Closes PR12969.
2012-08-04 10:32:21 -04:00
Ryan Culpepper
1a77f4ee0e added recontract-out 2012-08-03 20:52:35 -04:00
Matthew Flatt
f11450d601 scribble/base: generalize `itemlist' to splice/coerce some arguments
Also, add a `spliceof' contract constructor to `scribble/decode'.
2012-08-03 13:43:23 -06:00
Vincent St-Amour
79c265ef89 Fix NaN handling of flexpt to be consistent with expt. 2012-08-03 14:21:44 -04:00
Vincent St-Amour
a6d5a98b61 Include NaN in all floating-point types.
Makes more closure properties hold, but weakens occurrence typing for
some comparisons involving flonums.
2012-08-03 14:21:44 -04:00
Kevin Tew
38e90b52c4 Fixes parallel raco make of relative paths including subdirectories
closes PR 12953
2012-08-03 09:15:22 -06:00
Robby Findler
2032aaf341 add a test case for check-expect expressions where the first position has an error
test case for commit 87a8f70148

related to PR 12943
2012-07-31 22:25:34 -05:00
Ryan Culpepper
6eb8da1f40 removed (unused) reference to not-break-exn? 2012-07-31 19:15:21 -04:00
Vincent St-Amour
800a328fe6 Fix documentation for packages and mutable lists.
As suggested by Matthew.
2012-07-31 17:12:30 -04:00
Kevin Tew
04839b39f8 [Distributed Places] fix failing drdr tests 2012-07-31 13:56:38 -06:00
Robby Findler
1a619bd047 add tooltips at the start and end of arrows indicating how many references
there are and how many definition sites there are (in check syntax)

also: Rackety
2012-07-30 21:46:22 -05:00
Matthew Flatt
b0f81b5365 racket/draw: use Cairo in a single-threaded way
This is a follow-up to commit ec6f3fd610. We're still
seeing crashes while rendering the "plot" documentation, and this
change seems to make things work on my machine.
2012-07-30 08:07:49 -06:00
Matthew Flatt
9b1db14328 ffi/com: fix clean-up of type descriptors
Merge to v5.3
2012-07-29 09:46:30 -06:00
Robby Findler
6e2fb2ac5e make the code that does the mixin checks work with define-local-member-name
closes PR 11279
closes PR 12397
2012-07-29 09:43:37 -05:00
Vincent St-Amour
dd02f5eeda Fix parametric require/typed in typed/racket/base.
Closes PR12951.

Please merge to release.
2012-07-29 09:02:58 -04:00
Ryan Culpepper
e10951024f syntax/parse: fix bug in specialized code for ellipsis patterns
The result of 'stx->list' is not always either a list or #f.

Merge to 5.3.
2012-07-28 17:37:06 -04:00
Eli Barzilay
1afc26c79b Fix test due to code refactoring, sort export lists in module descriptions. 2012-07-28 12:12:35 -04:00
Eli Barzilay
c2bea19d1b Adjust for new error mesage style.
(This is in part a temporary solution since the ",bt" command is now used
to show a backtrace as well as any "foo...:" hidden fields.)
2012-07-28 05:05:06 -04:00
Vincent St-Amour
52439d528b Move mutable list functions to the compatibility collect.
Mutable pair functions from racket/base are not moved.
2012-07-27 16:49:05 -04:00
Matthew Flatt
9d6f0e96ba fix for bytecode validator
Fix tchecking for a rest argument to a function that
is lifted by closure conversion so that one of its
arguments is a mutable local variable's location.

Also reject bytecode that would pass too many arguments
to a lifted function, since that would trigger an arity
error that might try to use a location as a value.

Merge to v5.3
2012-07-26 16:32:59 -06:00
Matthew Flatt
b208a104ec COM test updates 2012-07-26 16:32:59 -06:00
Matthew Flatt
100212cd53 another repair to `subprocess' test
Merge to v5.3
2012-07-26 10:53:56 -06:00
Matthew Flatt
87d24ece78 more on `port-commit-peeked' and EOFs
Continues/fixes commit 4c3dd00d49.
2012-07-26 10:39:24 -06:00
Matthew Flatt
1efc894ada toward fixed interaction between positions and peek-commits
When a `port-commit-peeked' succeeds, position information should
(appear to) be updated. This patch synchronizes commits and
position information for primitive ports, but synchronizing
them for user ports remains a problem.
2012-07-26 10:39:17 -06:00
Matthew Flatt
8c10dc1579 fix a `subprocess' test
Merge to v5.3
2012-07-26 08:47:06 -06:00
Matthew Flatt
70ef4e6e57 racket/port: possible repair for `read-bytes-evt'
Also restore and add some tests.

Merge to v5.3
2012-07-26 08:39:58 -06:00
Matthew Flatt
ca3272bd45 racket/port: fix `make-limited-input-port' handling of progress evts
Merge to v5.3
2012-07-25 21:37:58 -06:00
Matthew Flatt
71045e255c fix `for/vector' to really stop at size
Avoids an infinite loop for an infinite sequence, for example.
Also, expand via `for/fold/derived' to improve error reporting.
2012-07-25 20:07:23 -06:00
Vincent St-Amour
b1577bd307 Fix type for add-between. 2012-07-24 16:41:52 -04:00
Matthew Flatt
289ae98c8e add missing `super-new' from class100 conversion
Also, move relevant tests to a better place.

Merge to v5.3
2012-07-24 11:16:43 -05:00
Matthew Flatt
f7382b17c7 ad hoc optimization of `hash-ref'
Convert
 (hash-ref <hash> <key-expr> (lambda () <literal>))
to
 (hash-ref <hash> <key-expr> <literal>)
which is useful for making the `case' expansion fit
Typed Racket.
2012-07-23 21:41:49 -05:00
Matthew Flatt
22960b9c75 fix `subprocess' test
Merge to v5.3
2012-07-23 21:41:49 -05:00
Matthew Flatt
eb6a6e7136 new test cases for `case'
Trigger binary-search and hash-table modes.
2012-07-23 18:56:33 -05:00
Matthew Flatt
05495764ea errortrace: fix profiling for phase >= 2 code
Closes PR 25050

Merge to v5.3
2012-07-23 07:05:40 -05:00
Matthew Flatt
a0ba30d8e7 fix `syntax-local-get-shadower' for submodules
Closes PR 12926, 12928

Merge to v5.3
2012-07-22 21:43:20 -05:00
James Swaine
ca360cdaed Add test to track performance of code inside a future over time 2012-07-22 20:08:51 -05:00
James Swaine
6eed135d02 Fix "dancing flags" issue with timeline ticks in future visualizer 2012-07-22 20:03:36 -05:00
James Swaine
e4f50997ad Minor changes to future-visualizer/trace tests 2012-07-22 20:03:22 -05:00
James Swaine
5214995967 Add unit tests for future-visualizer/trace 2012-07-22 20:03:22 -05:00
Matthew Flatt
d95ec4d454 fixes for submodules and `variable-reference->namespace'
Closes PR 12925

Merge to 5.3
2012-07-22 11:54:46 -05:00
Sam Tobin-Hochstadt
4a90c6c1fe Ensure that structs don't overlap with simple values.
Reported by Ray Racine.

Please merge to release.
2012-07-20 13:01:32 -04:00
Ryan Culpepper
510d3937a7 change id-tables so iterators not invalidated by mutation of existing keys
id-table fixes

test for id-table
2012-07-20 10:59:50 -04:00
Asumu Takikawa
e14c5d61e9 Allow guards for impersonatable struct type properties 2012-07-19 22:46:14 -04:00
Matthew Flatt
d3677524b8 macro expander fix
Relevant to PR 12863

Merge to v5.3
2012-07-19 20:42:36 -05:00
Matthew Flatt
a45d13b52a another `namespace-attach-module' repair for submodules
Merge to v5.3
2012-07-19 16:50:25 -05:00
Matthew Flatt
d44aa13c15 test case to finish repair for `racket/gui/init' load handler
Test case for b111241afe.
2012-07-19 07:46:50 -05:00
Robby Findler
b342009e71 bring back drscheme/private/number-snip.ss since it may
appear in saved wxme format files

also, improve the testing support for testing snip loading
(before this, the testing infrastructure could let one test
"leak" into another one in a way that could mask failures)

please include in release branch
2012-07-19 07:29:42 -05:00
Robby Findler
ef5c2b825f fixed repl-test-misc.rkt for the error message changes
please include on the release branch
2012-07-19 06:26:43 -05:00
Eli Barzilay
6565538b09 Disable the #:before-first' and #:after-last' functionality in `add-between'.
Leave it working in splicing mode.  I prefer doing that over always
splicing them, since that would make a less uniform interface, so I
rather keep all options open.  There is no longer a `#:nothing' keyword,
which is the main point of this downgrade.

(See mailing list discussion on "no-argument" for the reason.)
2012-07-18 22:28:41 -04:00
Robby Findler
17594ec804 module lang test now up to date with error message changes
please include in release branch
2012-07-17 22:33:56 -05:00
Robby Findler
d8204b1624 adjusted the repl test suite for the new error messages
and the change to the racket/gui load-handler

(unfortunately, there is still another problem that keeps
the test suite from passing)

please merge to the release branch
2012-07-17 21:59:05 -05:00
Robby Findler
8744cd7811 bring the language test up to date with the latest error messages
include in the release branch, please
2012-07-17 21:58:56 -05:00
Matthew Flatt
5e4866e54c fill in one more corner of submodules and `namespace-attach-module'
When submodules are not independently loaded, then pull submodule
declarations along when attaching a module to a namespace.
2012-07-17 10:16:32 -06:00
Matthew Flatt
c8f4ac6ae4 submodules: make .zo path stick for consistent independent loading
When a module is loaded from bytecode and then the value of
`use-compiled-file-paths' changes, an attempt to load a submodule
would fail, because source isn't used if the main module is
already declared, and the bytecode code is not used according to
`use-compiled-file-paths'. Make the bytecode path stick when it
is used once, so that submodule loads succeed, and make it work
even with `namespace-module-attach'.

The module-attach part of this protocol requires a change to the
API of a module name resolver: the notification mode gets two
arguments, instead of one, where the second argument is an
environment.
2012-07-17 09:47:05 -06:00
James Swaine
b987be068e Move racket/future/visualizer, racket/future/trace --> future-visualizer, future-visualizer/trace 2012-07-16 12:23:46 -05:00
Matthew Flatt
a605183a0a more submodule repairs for `raco exe' 2012-07-16 10:02:13 -06:00
Eric Dobson
9dac995e36 Fix things broken by bad rebasing. 2012-07-15 19:21:26 -04:00
Eric Dobson
1df6165e9f Clean up of typechecking for heterogeneous vectors and structs. 2012-07-15 19:21:26 -04:00
Eric Dobson
779291c795 Remove special cases for - and fx- in tc-app.rkt. 2012-07-15 19:21:26 -04:00
Matthew Flatt
55a8445b0b allow test to run if GL is unavailable 2012-07-15 10:36:36 -06:00
Matthew Flatt
73e901a262 fix optimizer bug
The lambda-lifting transformation needs to iterate to a fixpoint
where each lambda's added arguments and order are known. The
check for whether something changed was formerly just the number
of added arguments, but that's not good enough, because a binding
might get lifted away while another one acquires an extra argument.
The right test is to check the count and original bindings for the
added arguments.

Closes PR 12910
2012-07-15 10:32:45 -06:00
Sam Tobin-Hochstadt
8c659d50ed Properly handle quoted constants with bad expected types.
Closes PR 12874.
2012-07-14 23:06:13 -04:00
Sam Tobin-Hochstadt
1dca82784b Handle arbitrary recursive contracts generated from Rec types. 2012-07-14 22:45:08 -04:00
Sam Tobin-Hochstadt
2aaeec4520 Improve type of values when applied to one argument.
Closes PR 12846.
2012-07-14 22:45:08 -04:00
Sam Tobin-Hochstadt
ccf79943ab Fix special case for expected unions of vectors.
Closes PR 12845.
2012-07-14 21:56:44 -04:00
Sam Tobin-Hochstadt
2500dad8f1 Don't shortcut simple letrec forms that aren't lambdas.
Closes PR 12841.
2012-07-14 21:36:56 -04:00
Sam Tobin-Hochstadt
9e097866bf Vector fixes.
- Allow indexing into a VectorTop, with result `Any`.
- Don't use special typing rules for applications when the operator
  has an annotation or instantiation.

Closes PR 12887.
Closes PR 12888.
2012-07-14 21:30:26 -04:00
Sam Tobin-Hochstadt
f40c7f11a6 Mutable data at typed boundaries can't have flat contracts.
Closes PR 12884.
2012-07-14 20:43:35 -04:00
Matthew Flatt
e430463ea4 another submodule expansion repair
Relevant to PR 12902
2012-07-13 09:38:44 -06:00
Matthew Flatt
f729c6441c racket/draw: fix gl-context<%> locking
The optional arguments for `call-as-current' for `gl-context<%>'
were not implemented, and the locking implementation didn't match
the documentation in other ways.
2012-07-13 07:45:21 -06:00
Sam Tobin-Hochstadt
2dd9a43d1b Fix tests for new type name declaration. 2012-07-12 17:41:12 -04:00
Asumu Takikawa
3158acd61d Fix unit test broken by mzlib movement 2012-07-11 21:38:42 -04:00
Asumu Takikawa
403aaac7d4 Moved some mzlib library implementations to racket
The libraries moved were:
  - mzlib/control      => racket/control
  - mzlib/date         => racket/date
  - mzlib/deflate      => file/gzip
  - mzlib/inflate      => file/gunzip
  - mzlib/port         => racket/port
  - mzlib/process      => racket/system
  - mzlib/runtime-path => racket/runtime-path
  - mzlib/shared       => racket/shared
  - mzlib/unit         => racket/unit
  - mzlib/unit-exptime => racket/unit-exptime
  - mzlib/zip          => file/zip

The old modules in mzlib are now pointers to the
new modules. These are all modules that were already
redirected in the documentation.
2012-07-11 18:26:10 -04:00
Matthew Flatt
f747c086d8 fix checking for `syntax-local-lift-require'
Closes PR 12894
2012-07-11 14:03:31 -06:00
James Swaine
91de1fae7c Remove unused test file 2012-07-11 09:17:49 -05:00
Robby Findler
dcdc2aea02 allow promises to be impersonated and thus allow impersonator contracts
related to PR 12861
2012-07-10 22:23:26 -05:00
Matthew Flatt
506b70f71f fix `variable-reference->module-source' for submodules
Unlike the `variable-reference->resolved-module-path', the module
source one doesn't include a submodule path.
2012-07-10 18:35:03 -06:00
Matthew Flatt
428711bf93 another submodule-expansion repair 2012-07-10 15:05:40 -06:00
Neil Toronto
392d7bfbad Added sequence typecheck tests
Added empty-sequence type (prints funny but works polymorphically; will submit bug report)
Loosened type of sequence-andmap (can't mimic andmap's predicate type)
2012-07-10 13:22:53 -07:00
Matthew Flatt
ffe39c5974 fix support code for some tests 2012-07-10 11:42:42 -06:00
Matthew Flatt
603e920538 syntax/location: fix and change `quote-submodule-{name,path}'
Paths are left as paths, instead of trying to convert them to strings
or byte strings. Submodule path elements should be unquoted -- in the
same form as a `submod' form. All extra parts are submodule path elements,
never module paths or ".".
2012-07-10 11:42:42 -06:00
Sam Tobin-Hochstadt
6bf141513f Revise type environment propagation to use submodules.
Each typed module now defines a submodule named `type-decl`.
This module performs the type environment initialization (along
with other environment updates) when invoked.  Additionall,
every typed module, when invoked, performs a for-syntax addition
to a list specifying the submodules that need invocation.
This invocation is then performed by the `#%module-begin` from
Typed Racket.

The `type-decl` module always goes at the beginning of the
expanded module, so that it's available at syntax-time for all
the other submodules.  This involved adding pre- and post-
syntaxes for the results of typechecking.

This allows significant runtime dependency reduction from the
main `typed/racket` and `typed/racket/base` languages (not yet
complete).
2012-07-10 12:49:27 -04:00
James Swaine
dbec8765e3 Futures visualizer - reorganize modules, expose formerly private stuff as public (and docs) 2012-07-10 10:55:19 -05:00
James Swaine
2b2070f7b2 Clean up code in futures visualizer
Remove mouseover display for creation graph nodes (for now)
2012-07-10 10:54:43 -05:00
Burke Fetscher
7972adc97a Futures visualizer - Various bug fixes 2012-07-10 10:54:43 -05:00
James Swaine
b6f71ec4be Add futures visualizer, improvements to futures logging 2012-07-10 10:54:42 -05:00
Matthew Flatt
48e154e3cb scriblib/autobib: first cut at configurable style
Adds `number-style' as an alternative to `author+date-style'.
2012-07-10 00:21:56 -06:00
Matthew Flatt
71fe28e5dc scriblib/autobib: fixes in docs and related to disambiguation
Fixed problems related to sorting, more than two references for
one citation, and "specific" additions like page numbers.

Also, removed a set of parentheses around disambiguated dates
in the bibliography, because I don't think they belong there.

The doc format was confused; for example, square brackets don't mean
optional in a syntactic form documentation, but instead mean square
brackets.
2012-07-10 00:21:56 -06:00
Vincent St-Amour
dba49db078 Fix type of andmap and ormap on empty lists.
Closes PR 12882.
2012-07-06 12:28:37 -04:00
Matthew Flatt
f71037c775 also improve JIT support for unboxed flonums in non-tail-call
Applies to non-tail calls to immediate functions, which can be
generated by a `for' or `let loop' pattern in a non-tail
position.
2012-07-06 08:07:10 -06:00
Robby Findler
467bde3a25 fixed promise/c so it creates chaperone contracts when its
argument is a chaperone contract

closes PR 12861
2012-07-04 18:41:55 -05:00
Matthew Flatt
aa68692b37 allow `begin' wrapper on a submodule to re-expand
Closes PR 12835
2012-07-02 10:02:41 -06:00
Matthew Flatt
3662aee60b *SL: fix `check-expect' syntax checking
Bug introduced during error-message conversion.
2012-07-01 09:25:12 -06:00
Matthew Flatt
67cbd52e24 fix benchmark driver for running an old version 2012-06-28 14:32:01 -06:00
Sam Tobin-Hochstadt
20e95f8d8e More refactoring and reduction of runtime dependencies. 2012-06-28 14:34:07 -04:00
Sam Tobin-Hochstadt
f075ecd36e File splitting, dependency reduction. 2012-06-28 14:34:07 -04:00
Matthew Flatt
0d1056dbed fix potential bad interaction of module caching and JIT assumption
The JIT wants to detect calls to functions bound to module-level
variables that are always instantiated to a procedure of a particular
arity, in which case it can avoid some checks.  The problem is that
bytecode and JITted code can be shared via the module cache across
namespaces that use different modules to implement a particular module
path or that enable the JIT differently.  In particular, starting with
one that has a procedure binding and then using one (in a different
namespace) that has a non-procedure binding could lead to a crash.

Defend against this possibility by never treating imported variables
as constant in that sense. The JIT detects imported variables through
a new import map in the prefix.

This change may slow code. My guess is that it will have no
performance impact in practice, due to cross-module inlining,
although I can construct a microbenchmark that slows by 20%.
2012-06-27 09:57:50 -06:00
Matthew Flatt
577cf4592e fix problems with references to bindings at higher phases 2012-06-27 09:57:50 -06:00
Matthew Flatt
edce1b0406 fix optimizer for impersonated continuation mark keys
The optimizer can no longer reduce
  (with-continuation-mark _id _v-expr _expr)
to just
  _expr
when _v-expr and _expr are simple enough, because _id
might be bound to a continuation mark key with an
impersonator that checks the result of _v-expr.

The loss of an optimization can have a significant affect on
errortrace of microbenchmarks, such as

 (for ([i (in-range 10000000)])
   i)
2012-06-27 09:57:50 -06:00
Vincent St-Amour
db6c2e7737 Update types of string-join and add-between. 2012-06-27 11:39:15 -04:00
Asumu Takikawa
095d47fc3d racket/contract: rename prompt/c & continuation-mark/c
The new names are `prompt-tag/c` and `continuation-mark-key/c`
to keep the names consistent with the values that are being
contracted. Also updated the HISTORY file.
2012-06-26 21:11:58 -04:00
Asumu Takikawa
fcab398081 racket/class: add send+ for functional style OO 2012-06-26 21:11:58 -04:00
Eli Barzilay
0c78194267 Adjust the keyword names for string-join' following the change to add-between'. 2012-06-26 13:45:16 -04:00
Asumu Takikawa
de5c756d2e Added continuation-mark/c 2012-06-26 13:39:36 -04:00
Asumu Takikawa
db6c37df92 Add proxy-able continuation mark keys and proxies
(with much help from Matthew on the JIT side)
2012-06-26 13:39:36 -04:00
Matthew Flatt
a6e263741a racket/list: adjust `add-between' keyword handling
Add a `#:nothing' argument so the no-value value can be
made explicit --- based on discussion with Eli, but pending
further review.

Also, renamed `#:first' to `#:before-first' and `#:last' to
`#:after-last' to be more clear, more parallel ro `#:before-last',
and avoid a collision with prominent function names.
2012-06-26 11:00:11 -06:00
Asumu Takikawa
552d6de953 racket/generics: add contract combinator
The generics library now generates a `name/c` macro
for a generic interface `name`. The combinator can be
used to contract instances (or constructors) of a
generic interface across standard contract boundaries.
2012-06-25 20:33:48 -04:00
Matthew Flatt
cb88590dfb fix interaction of `procedure-arity-includes?' and other things
A arity-reduced procedure-valued `prop:procedure' was not handled
correctly, for example.

A good candidate for random testing? I had the right kind of test in
place, but only for an arity of 1. It turns out that testing any other
arity would have exposed the problem, so now there are tests with
arity 0. If I had randomly generated procedures instead of manually
constructing `f0' through `f1:+' in "procs.rktl", then maybe I would
have more naturally generalized the arity testing, too. Then again,
I did already have relevant inputs, and it was the testing of inputs
that was too specific.

Closes PR 12870
2012-06-25 17:30:03 -06:00
Matthias Felleisen
b5b918ca4a restored object-name tests for the new doc system 2012-06-25 19:15:09 -04:00
Matthias Felleisen
92c62d7417 disabled name tests for htdp languages during documentation reorg 2012-06-25 19:15:08 -04:00
Sam Tobin-Hochstadt
88ff5fee69 Minor refactorings.
- Remove tracing requires.
 - Use lists instead of sets in a few environments.
 - Small cleanups.
2012-06-25 18:07:45 -04:00
Jay McCarthy
bc72ddd88a New error message 2012-06-25 15:59:17 -06:00
Sam Tobin-Hochstadt
ccb724155a scheme -> racket 2012-06-25 13:39:07 -04:00
Vincent St-Amour
972df7c89e Add #:unless to the for: macros. 2012-06-25 13:38:51 -04:00
Vincent St-Amour
b1ad108759 Update type of string-join for its new keyword arguments.
Closes PR12866.
2012-06-25 13:05:46 -04:00
Matthew Flatt
c11527494e racket/port: fix problems with `read-bytes!-evt'
See PR 12860; some of problem related to the PR were "fixed" by
adjusting the guarantees that are specified in the documentation.

Another problem was that non-consecutive bytes could be returned.
2012-06-24 07:38:09 -06:00
Matthew Flatt
5433d2302a fix some error-message tests 2012-06-23 05:21:52 -07:00
Matthew Flatt
4323096a46 change contract on second' of date' to allow only 1 leap second 2012-06-23 02:04:55 -07:00
Eli Barzilay
f0d856ab7a Extend string-join' in a similar way to add-between'.
(This is actually the extension that made me do the other too.)
2012-06-23 04:44:20 -04:00
Eli Barzilay
728687d9dc Extend `add-between'.
New keywords: `#:first', `#:before-last', `#:last', and `#:splice?'.
2012-06-23 04:44:20 -04:00
Vincent St-Amour
ee142047f8 Add type for range, and extend in-range's. 2012-06-22 17:53:43 -04:00
Eli Barzilay
7ec9975736 Move regexp-replaces' from ffi/unsafe' to `racket/private/string'.
* The old function was removed completely, people will get it from
  `racket/base' anyway.

* I also removed its documentation.  I thought about leaving a note in,
  but if `define-ffi-definer' is the preferred style, then this should
  be done when there's a way to make `define-ffi-definer' use it.  (Eg,
  some new #:keyword that adds a way to change the defined name.)

* Note that the function is added to `racket/private/string' and not to
  `racket/string' because the latter deals only with strings, and the
  new function accepts byte strings too.  It might be better to start a
  new `racket/regexp' module for these functions.
2012-06-22 14:27:14 -04:00
Eli Barzilay
7b4772e120 Extend `regexp-replace*' to accept a start/end-position.
Note that this pushes the `ipre' argument to the end.
2012-06-22 12:00:48 -04:00
Eli Barzilay
7d6e79023c Random pickiness.
Spaces at EOFs, indentation, etc.
2012-06-22 12:00:48 -04:00
Matthew Flatt
d253b89ba8 racket/port: fix read-bytes-evt' and read-string-evt'
As the documentation says, it's supposed to be ok to use the
same evt multiple times or in multiple threads, but an internal
buffer was allocated incorrectly, so that multiple/concurrent
uses could go wrong.

Closes PR 12860
2012-06-22 09:48:00 +08:00
Matthew Flatt
1dc0072d03 further error message convention refinements
Add extra intitial-message lines, use "..." on a field name
to indicate that it could reasonably be hidden by default,
and refine some existing messages.
2012-06-22 09:47:59 +08:00
Matthew Flatt
40c892ff80 futures: future-local handling of stack overflow
Includes the addition of 'overflow and 'start-overflow-work
events, whcih are effectively specializations of 'sync and
'start-work to expose overflow handling.

Also, fix a bug related to a potential GC during mark-stack
restore from a lightweight continuation.
2012-06-21 07:14:50 +08:00
Matthew Flatt
9af2a331ca another ASL error-message repair 2012-06-21 07:14:49 +08:00
Robby Findler
f38024d4ed fix struct/c for the case that the selectors are not available at the use site.
closes PR 12854
2012-06-20 11:23:20 -05:00
Robby Findler
c0b928c758 Added @literal-algol{} and started an algol60 test suite (apologies
if there already was one that I didn't find). Also fixed syntax
error raising procedure.

closes PR 12859
2012-06-20 10:28:53 -05:00
John Clements
c01e8c1564 refactored to reduce stepper dependencies 2012-06-19 23:51:59 -07:00
Eli Barzilay
4c2940a6d9 Simplify away uses of "-t" in `drdr:command-line'.
In some cases use `module+' to make the code run nicely without a "-m".

(And some other minor tweaks.)
2012-06-19 12:52:22 -04:00
Asumu Takikawa
0e4f9fcd97 racket/gui: fixed by-position widget initialization
This was broken in the class100 port. The init arguments
previously handled by the class100*/kw macro need to be
explicitly passed down.

Also, an (init-rest) is needed at the leaves of the class
hierarchy to ensure that internal super init args don't
leak via error messages. (the class100 macro always
inserts these)

Added a test file so similar breakage is detectable in the
future.
2012-06-19 12:37:35 -04:00
Eli Barzilay
2c19677358 Make some .rktl tests run with "racket".
With this commit, all of the leftover mentions of gracket in
`drdr:command-line' are things that pop up windows.
2012-06-19 03:18:23 -04:00
Eli Barzilay
b8034828d0 Sort the mess with aligned-pasteboard tests.
1. Lots of #lang-ization, other racketizations, code improvements, etc.

2. Some files that were not working now do.

3. "collects/tests/aligned-pasteboard" had some files that were near
   duplicates of "collects/mrlib/private/aligned-pasteboard/tests".
   I've removed the former since in a few places it looked like an older
   version (eg, there were bogus references to a non-existent
   "utils.rkt").  The former has more files that are in runnable
   condition now.

4. There are plenty of tests that look like they're failing, but it
   wasn't shown since they just return #f, and when they were running
   with a "-f" these results weren't displayed.

5. I have no idea about the code, this is all just reshuffling and minor
   editing.
2012-06-19 01:42:20 -04:00
Vincent St-Amour
24b6ecf2a6 Extend time-apply to work with procedures with more than 2 arguments. 2012-06-17 23:04:47 -04:00
Sam Tobin-Hochstadt
39e014bc55 Handle submodules in Typed Racket. 2012-06-16 22:08:06 +08:00
Asumu Takikawa
ab0d3d6492 Fix TR optimizer test
(round to avoid FPU sensitivity)
2012-06-14 18:22:42 -04:00
Asumu Takikawa
5d232f3748 racket/control: add aliases and update %/fcontrol
Added alises for call-with-continuation-prompt,
abort-current-continuation, and call-with-composable-continuation.
Also allow % and fcontrol to take an optional prompt tag argument.
2012-06-14 17:33:43 -04:00
Vincent St-Amour
c4613cf9ab Unbox exp on complex numbers. 2012-06-14 17:17:03 -04:00
Matthew Flatt
a871574318 make #%plain-module-begin' transformer detect module*' in stop list 2012-06-13 17:07:06 +08:00
Asumu Takikawa
a181011b55 Check for proxied prompt tags when needed
Fixes a bug where some control operators would
not recognize proxied prompt tags (non-proxied were fine)
2012-06-11 21:04:45 -04:00
Asumu Takikawa
5aa76c27a9 Support multiple values for control proxy functions 2012-06-11 18:18:37 -04:00
Asumu Takikawa
1cce922d97 Add prompt tag contracts using control proxies 2012-06-11 18:18:37 -04:00
Asumu Takikawa
d527426cac Prototype implementation of control proxies 2012-06-11 18:18:37 -04:00
Matthew Flatt
82943df351 another *SL error-message repair 2012-06-12 06:02:57 +08:00
Jon Rafkind
fc96cb258c [honu] assignment operators cooperate with the dot operator 2012-06-11 13:07:52 -06:00
Robby Findler
c9693ab910 adjust the drracket language test suite for the new error messages 2012-06-11 14:04:05 -05:00
Vincent St-Amour
c4743724cd Restore testing of sqrt and log. 2012-06-09 22:07:43 -04:00
Neil Toronto
8f840bd07b Fixed erroneously imprecise type for +nan.f literal (now Single-Flonum-Nan)
Types for nan?, infinite?, pi.f, exact-round, exact-floor, exact-ceiling,
exact-truncate, degrees->radians, radians->degrees

Extended tc-random-testing: generates exact integers and rationals now

Fixed types of sinh, cosh and tanh to account for underflow and NaNs
2012-06-09 17:46:04 -06:00
Neil Toronto
ddeda70b20 Added to HISTORY.txt
Added (report-errs) to tests/racket/math.rktl
2012-06-09 17:46:04 -06:00
Vincent St-Amour
a89bd99e2a Fix printing of single-precision floats.
If there's already an exponent separator, replace it with f.

Closes PR12836.
2012-06-09 19:35:37 -04:00
Matthew Flatt
5caa114564 fix `print-syntax-width' for +inf.0
Closes PR 12837
2012-06-10 06:58:06 +08:00
Matthew Flatt
fbb6a294f3 local-expand' allows a stop list to have only module*'
That is, when the sto plist contains only `module*', core
forms are not implicitly added to the stop list.
2012-06-08 16:08:55 +08:00
Robby Findler
41a890df03 fix bug in the ->i parser (picked up the wrong identifier; wrote #'id when
id wasn't really around anywhere)

closes PR 12829
2012-06-07 10:45:18 -05:00
Vincent St-Amour
0b7eaf56ca Fix generation of random floats in TR random testing. 2012-06-06 18:26:51 -04:00
Vincent St-Amour
3e9b527bd0 Fix comment. 2012-06-06 18:26:51 -04:00
Matthew Flatt
255e3cbe2e another *SL error-rewriting fix
Arity errors no include supplied arguments, but strip them
away for *SL messages.
2012-06-06 13:25:14 +08:00
Neil Toronto
a713ca8a8b Added nan?, infinite?, degrees->radians, radians->degrees, exact-round, exact-floor, exact-ceiling, exact-truncate to racket/math
Altered TR's random arithmetic testing to generate single-flonums and very small flonums; fails now because of erroneous types

Fixes to sgn, sinh, cosh, and tanh:
 * preserve single-flonum-ness
 * correct zero sign (-0.0) for negative return values that are smaller than epsilon
 * correct behavior with NaN and infinite inputs
2012-06-05 22:40:44 -06:00
Matthew Flatt
e44c0809e8 rewrite contract error messages for *SL
The rewrite involves parsing contract expressions and constructing
replacement prose.
2012-06-05 17:53:27 +08:00
Sam Tobin-Hochstadt
2b9912ea9f Repair failing test case (wrong expected value). 2012-06-04 17:02:19 -04:00
Sam Tobin-Hochstadt
cbbd889621 = can equate values with different types.
Closes PR 12804.
2012-06-03 10:50:18 -04:00
Matthew Flatt
cc0b887106 adjust *SL error-message rewriting 2012-06-03 11:09:32 +08:00
Sam Tobin-Hochstadt
865a2cdcbd Support definitions of keyword functions in Typed Racket.
Caveats:
 - keyword function definitions do not define static
   bindings, thus limiting optimization opportunities
 - can't use `define:`, `lambda:`, etc with keywords
 - error messages sometimes expose the implementation
 - the optimizer skips most of the generated code for
   keyword functions definitions (user-level code is
   optimized)
2012-06-02 18:22:07 -04:00
Jon Rafkind
244f1cccb7 [honu] fix the pattern form and use quote-syntax to prevent syntaxes from being interpolated too early 2012-06-02 15:33:55 -06:00
Jon Rafkind
2b5e5c5b57 [honu] combine string-append and the evaluator 2012-06-02 15:33:54 -06:00
Jon Rafkind
d688621a18 [honu] use sandbox evaluator to test honu code 2012-06-02 15:33:54 -06:00
Robby Findler
058504afbd adjust datalog so that syntax objects are not used as source location
information representation.

This should make datalog work better with compiled files and it
should also avoid an O(n^2) problem in the way it expands
2012-06-02 08:04:45 -05:00
Matthew Flatt
85a2267e6c ffi/unsafe: new error message convention at primitives
Also, fix FFI procedures to preserve names: change `ptr-ref' with
`_fpointer' on an `ffi-obj' value to return the `ffi-obj'
value, so that the name in the `ffi-obj' value can be used
by `_cprocedure'.

Closes PR 12645
2012-06-01 19:03:43 -07:00
Sam Tobin-Hochstadt
a377c42357 Use the new syntax properties for checking keyword functions.
Previously, some hacks were used to obtain the internal
identifiers that implemented keyword functions directly, and
give them types at startup.  Now, the primary "function"
(eg, `sort`) is given a type, and when used, the residual
syntax properties are used to find `sort` from the real
functions, and then the type of the real function is computed
from the type of `sort`.

Some creativity was required in the types of functions which
take optional arguments that when present, alter the return type,
such as `regexp-match*` and `file->list`.
2012-06-01 18:37:02 -04:00
Eric Dobson
262ecc3da9 Redefine Boolean as (U #t #f).
Closes PR 12815.
2012-06-01 10:26:10 -04:00
Robby Findler
64e4a43c9c fix easter egg test suite for the new error messages 2012-06-01 07:16:14 -05:00
Robby Findler
7118547c58 adjusted the module-language, pretty-big and r5rs parts of
the drracket language test for the new error messages
2012-06-01 02:36:54 -05:00
Eric Dobson
c2d9f7ed9a Attach struct info to constructor for polymorphic TR structs.
Closes PR 12806
2012-05-31 13:09:26 -04:00
Robby Findler
f721c0427d adjust the timeouts to two drracket tests and add a little syncronization help in a third 2012-05-31 10:56:13 -05:00
Matthew Flatt
f10a258dcb ffi/unsafe: fix arithmetic overflow and representation
Thanks to Tobias Hammer for the report and initial repairs.
2012-05-31 09:21:25 -06:00
Eric Dobson
735b84b083 Add support for multiple provides of the same identifier in TR.
Closes PR 12807.
2012-05-31 10:02:03 -04:00
Robby Findler
77811e0e95 Adjust how the drracket repl iterates over expressions to make it more
like textual-read-eval-print-loop

There is still a difference, however, because drracket's REPL has a
notion of multiple expressions that are submitted simultaneously that
textual-read-eval-print-loop doesn't. For example, if you type this at
the prompt:

  (car) (+ 1 2)

then textual-read-eval-print-loop will print out the error and then 3,
but drracket will print only the error (ditto if (car) were replaced
by a continuation abort).

This difference is, IMO, a good thing, since it lets you use a single
interaction to do multiple things, but stops as soon as there is an
error. (It is also how drracket has behaved for a long time.)

closes PR 12790
2012-05-30 22:31:55 -05:00
Robby Findler
efd6772e9a adjust repl-test and the module language test for the new error message format 2012-05-30 22:31:54 -05:00
Matthew Flatt
e8645598d7 futures: fix bug related to tail calls 2012-05-30 16:20:36 -06:00
Jay McCarthy
38ae869d66 Fixing error introduced by 9e7548de 2012-05-29 13:39:37 -06:00
Matthew Flatt
26269c329e racket/base: add some missing predicates
The new predicates are `progress-evt?' `thread-cell-values?',
`prefab-key?', `semaphore-peek-evt?', and `channel-put-evt?'.
These were used internally, and now they appear in contract
error messages.
2012-05-29 11:01:52 -06:00
Matthew Flatt
6fded4bac1 syntax/free-vars: fix quadratic behavior
(Forgot to fix the "FIXME" before committing last time.)
2012-05-28 20:22:31 -06:00
Matthew Flatt
ee93e35260 syntax/free-vars: deterministic result order
Closes PR 12798
2012-05-28 20:15:43 -06:00
Jay McCarthy
211e869fe1 Supporting methods in web-server/dispatch 2012-05-28 14:13:19 -06:00
Jay McCarthy
8b035f3c73 Fixing PR12779 2012-05-28 11:52:56 -06:00
Matthew Flatt
99635ab091 change `impersonate-struct' to require evidence that a field is mutable
When supplying an accessor to redirect, either the corresponding field
must be accessible through the current inspector, or a mutator for
the same field must be redirected, too.

Stevie realized that we need this constraint; otherwise, impersonators
can implement mutator-like behavior even when the mutator is otherwise
secret.
2012-05-27 15:37:45 -06:00
Matthew Flatt
73ce5a4767 racket/serialize: fix for submodules
Closes PR 12795
2012-05-27 14:39:51 -06:00
Matthew Flatt
6eeb8fccbd more error-message conversion 2012-05-27 09:03:19 -06:00
Matthew Flatt
8ab87a9fcc racket/class: new error message convention 2012-05-26 21:08:21 -06:00
Asumu Takikawa
cfe1711494 Convert all uses of mzlib/class100 to racket/class 2012-05-26 11:12:55 -04:00
Asumu Takikawa
6341fe7e01 Remove gracket test that does not run.
The file is written in mzscheme or pre-mzscheme and
tries to load files that no longer exist.
2012-05-26 11:12:55 -04:00
Vincent St-Amour
3062efe47f Reduce random testing attemps to avoid DrDr timeouts. 2012-05-26 11:06:29 -04:00
Matthew Flatt
b5ab6cec7e fix misc tests for error-message change 2012-05-26 08:18:19 -06:00
Matthew Flatt
413c940fe6 update HtDP *SL tests for revised error-message convention
This change does not yet update the *SL error-message rewriter
to recognize the new error-message formats; the tests do not
currently use the rewriter. A next step is to decide on the
rewritings, implement them, change the test suite to use the
rewriter, and test the rewritings.
2012-05-26 08:05:12 -06:00
Matthew Flatt
d6774d5d54 racket/sandbox: add sandbox-propagate-exceptions 2012-05-25 18:37:29 -06:00
Vincent St-Amour
142158c0cb Add random testing script for float types. 2012-05-25 17:15:22 -04:00
Vincent St-Amour
186b463217 Fix NaN and inf handling in flonum specific op types. 2012-05-25 17:15:22 -04:00
Matthew Flatt
9e7548de61 new error message convention
Add `raise-argument-error', `raise-result-error', `raise-arguments-error',
and `raise-range-error'.

The old convention was designed for reporting on a single (sometimes very
long line). The new convention is

 <name>: <short message>
   <field>: <detail>
   ...

If <detail> is long or itself spans multiple lines, then it may
also use the form

   <field>:
    <detail>

where each line of <detail> is indented by 3 spaces.

Backtrace information is shown as a multi-line "context" field.
2012-05-25 15:08:05 -06:00
Robby Findler
7156b0391b fix the contract context messages for the case of ->*'s #:rest arguments 2012-05-25 09:14:09 -05:00
Asumu Takikawa
a22633e348 Rename generics => generic. 2012-05-24 16:51:14 -04:00
Vincent St-Amour
11dc825126 Forge gen:equal+hash and gen:custom-write to provide them from racket/base. 2012-05-24 16:51:13 -04:00
Vincent St-Amour
c21813cebf Add gen:custom-write.
No docs yet.
2012-05-24 16:51:13 -04:00
Vincent St-Amour
3210cd1d12 Remove vestigial set of parens and fix docs for new syntax. 2012-05-24 16:51:12 -04:00
Vincent St-Amour
dd05d6e6bc Make original generics tests quiet. 2012-05-24 16:51:11 -04:00
Vincent St-Amour
f42ae56893 Trailing whitespace. 2012-05-24 16:51:11 -04:00
Vincent St-Amour
390cd02b52 Have a generic interface for equal+hash.
Currently provided by racket/struct, for lack of a better place.
2012-05-24 16:51:11 -04:00
Vincent St-Amour
cc7ae795ea Remove the coercion function code.
Didn't turn out to be useful.
2012-05-24 16:51:10 -04:00
Asumu Takikawa
44783b9f8e Add tests from unstable/generics. 2012-05-24 16:51:10 -04:00
Asumu Takikawa
8ac82eaf58 Use simplified interface for define-generics
Also removed `generics`
2012-05-24 16:51:09 -04:00
Vincent St-Amour
f11861f60a Have method definitions be its own keyword in the struct form.
Struct properties are hidden from users.
2012-05-24 16:51:08 -04:00
Vincent St-Amour
3bfaa2b00b New naming convention for generics names. 2012-05-24 16:51:07 -04:00
Vincent St-Amour
08cd358300 Add iterators as tests for generics.
Equivalent to streams, so not useful to provide.
2012-05-24 16:50:46 -04:00
Asumu Takikawa
3a93df5566 Use racket/generics for extensions to racket/stream 2012-05-24 16:50:44 -04:00