Commit Graph

150 Commits

Author SHA1 Message Date
Vincent St-Amour
95d51fc892 Add new versions of for/hash: and co that the typechecker can handle.
Based on Eric Dobson's implementation.

Closes PR13248. Closes PR13249.
2012-11-20 17:45:15 -05:00
Vincent St-Amour
e2007abd7a Heterogenous -> heterogenEous.
Found by Ray Racine.
2012-11-20 17:06:51 -05:00
Vincent St-Amour
d994ba1914 Fix types of variable arity functions to work with 0-argument return values.
Closes PR13218.
2012-11-20 16:15:20 -05:00
Vincent St-Amour
6a7b971cd6 Only generate ->* contracts when arguments are really optional arguments.
Closes PR13274.
2012-11-19 17:35:07 -05:00
Asumu Takikawa
b4a98af319 Fix whitespace in test 2012-11-10 12:03:47 -05:00
Asumu Takikawa
d22532db16 Fix Custodian type 2012-11-10 11:12:06 -05:00
Asumu Takikawa
daca1c0d5b Fix a free variance bug
Commit ffe45ecce had introduced a regression with some
polymorphic functions imported between typed modules due to
miscommunicated variance information.
2012-11-09 01:43:57 -05:00
Sam Tobin-Hochstadt
c1cace28ec This test always errors -- belongs in fail. 2012-11-01 21:14:50 -04:00
Sam Tobin-Hochstadt
0e71f2d5dc Fix accidental use of the wrong letrec-bound variable. 2012-10-31 21:18:44 -04:00
Sam Tobin-Hochstadt
c6dc1e6ece Improve contract generation in Typed Racket.
This fixes several issues:
 - `Parameter` generates impersonator contracts correctly
 - `Any` handling now copies immutable data when possible
 - `Any` now recognizes more atomic base types

Merge to 5.3.1.
2012-10-25 23:31:02 -07:00
Eli Barzilay
cbfb1fdb37 A whole bunch of missing newlines at EOFs (and a few other spaceages). 2012-10-19 06:47:24 -04:00
Vincent St-Amour
326e3ba33f Add test. 2012-10-14 16:55:36 -04:00
Neil Toronto
6f52be186b Added working for/vector:, for*/vector:, for/flvector:, for*/flvector:
Closes PR13185.
2012-10-14 16:28:41 -04:00
Eric Dobson
788b046549 Make expt type more correct.
Closes PR13170.
2012-10-14 15:44:54 -04:00
Vincent St-Amour
844e898a54 Generate ->* contracts for functions with both optional and keyword arguments. 2012-10-14 15:44:54 -04:00
Vincent St-Amour
149d8535eb More float conversion optimizations. 2012-10-14 15:35:50 -04:00
Vincent St-Amour
758e4ff112 Only recommend dropping exactness in truly inexact contexts.
Please merge to release.
2012-10-12 14:42:16 -04:00
Sam Tobin-Hochstadt
962f2472e1 Revamp handling of Any as a contract.
The contract now has two major differences:
 - It raises an error when it would have to wrap.
 - It uses chaperones to delay errors as long as possible

In general, using `Any` as a type when exporting to untyped
code will now just work, unless the untyped code tries to
communicate values back to the typed side, in which case an
immediate error will be raised.

Much of the implementation comes from the membrane design
from [Strickland et al, OOPSLA 2012].
2012-10-05 12:39:11 -04:00
Sam Tobin-Hochstadt
86522a1804 This pattern of typed submodules exposes Racket bugs. 2012-10-03 12:24:16 -04:00
Sam Tobin-Hochstadt
cab90c16d5 Test for appropriate predicates for invariant structs. 2012-09-27 17:26:32 -04:00
Sam Tobin-Hochstadt
d066a5c1d2 Fix error message pattern for use of cons/c. 2012-09-27 16:39:16 -04:00
Eric Dobson
ffe45ecce4 Working covariant applications. 2012-09-27 16:22:22 -04:00
Eric Dobson
12233600c1 Fix -struct to use the right number of arguments to make-Struct. 2012-09-27 16:22:21 -04:00
Eric Dobson
745403a88e Make struct type contracts better 2012-09-27 16:22:21 -04:00
Eric Dobson
9e1cf579a4 Fix type->contract on structures. Now uses struct/c. 2012-09-27 16:22:21 -04: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
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
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
Sam Tobin-Hochstadt
1c275ffcc7 Don't use places for running single tests. 2012-08-20 14:45:50 -04: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
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
Sam Tobin-Hochstadt
6ae2a9d884 Fix internal require of typed submodules. 2012-08-13 17:20:20 -04:00
Eric Dobson
3876dfa841 Make generated flat contracts actually flat. 2012-08-10 10:39:44 -04: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
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
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