Commit Graph

652 Commits

Author SHA1 Message Date
Ryan Culpepper
f49412add8 moved unstable/poly-c to racket/contract/parametric 2011-04-08 08:25:22 -06:00
Ryan Culpepper
73ab167522 created racket/syntax from parts of unstable/syntax 2011-04-07 09:47:20 -06:00
Vincent St-Amour
60cc8c4453 Fix type of sqr. 2011-03-21 16:06:37 -04:00
Vincent St-Amour
17afa91c09 Provide the index? predicate. 2011-03-18 13:24:58 -04:00
Vincent St-Amour
bde2ee0b8d Changes to the regular base type environment. 2011-03-18 10:25:22 -04:00
Vincent St-Amour
ee29d371c9 Updated TR's base type environment to use the new numeric types.
This ended up being an almost complete rewrite of the base environment.
Note: While the commit is dated Jan 27, the work was finished on Mar 2.
2011-03-18 10:25:21 -04:00
Vincent St-Amour
bf6379c363 Add a helper function to add filters en masse to express propositions
that are true about a function's arguments if the function returns.
2011-03-18 10:25:20 -04:00
Vincent St-Amour
88fac43d55 Add an Exact-Number type. 2011-03-18 10:25:20 -04:00
Vincent St-Amour
f8528ac892 Change type of make-sequence to reflect changes to its implementation. 2011-03-17 18:43:57 -04:00
Vincent St-Amour
1b3052748e Add a case-> type-constructor as a synonym for case-lambda. 2011-01-31 16:39:20 -05:00
Vincent St-Amour
d65438c9ea Remove some legacy bindings. 2011-01-31 16:39:19 -05:00
Vincent St-Amour
22391be437 Cleanup of exposed base types. 2011-01-31 16:39:19 -05:00
Vincent St-Amour
f1c6c74284 Small-Float -> Single-Flonum 2011-01-31 16:39:18 -05:00
Vincent St-Amour
4ac36fd59b Added the new single-precision float function to TR. 2011-01-31 16:39:18 -05:00
Vincent St-Amour
b26531774b Update base-env-indexing to use the new types. 2011-01-31 16:39:15 -05:00
Vincent St-Amour
a0a54b231d Fix TR tests. 2011-01-31 16:39:14 -05:00
Vincent St-Amour
e56663c943 Add a predicate field to base types, which makes checking for
subtyping of value types easier.

However, this means that base types can't be marshaled as before,
since these predicates can't be marshaled. Instead, we now marshal
base types as identifiers that refer to their base type object.
2011-01-31 16:39:13 -05:00
Vincent St-Amour
3e27ed607c Avoid generating large contracts for common numeric types. 2011-01-31 16:39:13 -05:00
Vincent St-Amour
d4c93cc12e TR's numeric tower is now built from unions of non-overlapping base types.
A lot of the work that was done by special-casing number types can now be
done by TR's handling of unions. This makes it easier to add more numeric
types to the tower and should make writing down types for numeric
primitives much less error-prone.

In addition, this commit adds several numeric types that will help get
tighter bounds on integer arithmetic, such as Index types. They will have
to be integrated to the base environment before they can be useful.
2011-01-31 16:39:13 -05:00
Sam Tobin-Hochstadt
463ab0d309 Fix type of `-' 2010-12-08 19:31:57 -05:00
Sam Tobin-Hochstadt
e70ccafd7b Add `defined?' assertions to fix DrRacket. 2010-12-08 18:53:56 -05:00
Sam Tobin-Hochstadt
87eab889d6 Allow arbitrary filter specification in function types.
Allow (A -> B -> C) for curried function types.
2010-12-08 18:22:29 -05:00
Sam Tobin-Hochstadt
73dbf42e0e Better handling of `hash-*' functions, and hashes as sequences. 2010-12-08 18:22:29 -05:00
Vincent St-Amour
dc2df4882b Take into account potentially undefined values in letrec.
Closes PR11511.
2010-12-08 18:17:06 -05:00
Vincent St-Amour
e7c252739d Fix type for abs. Closes PR 11430. 2010-11-23 14:15:04 -05:00
Vincent St-Amour
54991835d6 Add type for fl->exact-integer. Closes PR 11429. 2010-11-23 14:15:04 -05:00
Vincent St-Amour
58d1f75dc1 Fix type for arithmetic-shift. Closes PR 11428. 2010-11-23 14:15:03 -05:00
Vincent St-Amour
7a7fe577cd Add type for integer-sqrt. Closes PR 11427. 2010-11-23 14:15:03 -05:00
Vincent St-Amour
e10f139ad8 Fix type for raise-type-error. Closes PR 11426. 2010-11-23 14:15:03 -05:00
Vincent St-Amour
2c74984fcd More precise type for sgn. Closes PR 11424. 2010-11-23 14:15:02 -05:00
Vincent St-Amour
c633913b94 Add optional argument to make-hash and co. 2010-10-27 16:15:50 -04:00
Sam Tobin-Hochstadt
561fdc8db5 Avoid dumb parsing bugs in require/typed. 2010-10-26 18:09:45 -04:00
Vincent St-Amour
a15236ea4f Fix opt-lambda:. Merge to 5.0.2. 2010-10-20 14:32:37 -04:00
Sam Tobin-Hochstadt
24bddafa82 Add type for `compose' 2010-10-14 11:44:14 -04:00
Vincent St-Amour
27e722f27b Inexact-Complex -> Float-Complex 2010-10-12 16:47:46 -04:00
Vincent St-Amour
52bd739d00 Added the Float-Complex type for consistency with the new float types.
Inexact-Complex has been kept as a synonym for backward compatibility.
2010-10-12 16:47:45 -04:00
Vincent St-Amour
a59a99c42d Changed the TR numeric tower to use the new flonums. 2010-10-12 16:47:45 -04:00
Stevie Strickland
3028f2d142 Convert vectorof/vector-immutableof to the new regime.
Also add old-style vectorof to mzlib/contract.
2010-09-16 15:04:41 -04:00
Vincent St-Amour
8aab96faa6 Made annotations optional for let: and variants. 2010-09-16 13:24:10 -04:00
Vincent St-Amour
9f87b5a7e6 Made some type annotations optional in the for: macros. 2010-09-15 20:21:51 -04:00
Vincent St-Amour
a10d145f25 Added annotated versions of the for macros that generate vectors.
They are purposedly left out of the documentation since the typchecker
can't currently handle their expansion.
2010-09-15 20:21:50 -04:00
Stevie Strickland
994ad6d10f Now change box/c to use proxies or chaperones appropriately.
Create a mzlib/contract compatible version of the old box/c and use that
for mzlib/contract.  Change the docs so that the docs for mzlib/contract
contain the right information.

Fix the typed-scheme implementation to only force flat box (or hash)
contracts when it already is required to be flat.  Otherwise, allow
non-flat contracts for the element contract (or domain/range contracts).
2010-09-15 16:57:17 -04:00
Sam Tobin-Hochstadt
5789981f2c Add some file primitives. 2010-09-10 18:29:34 -04:00
Sam Tobin-Hochstadt
0ae9e0ff85 Add `require' to fix tests. 2010-09-09 16:08:04 -04:00
Sam Tobin-Hochstadt
bc6d8f98ed Avoid printing results of `define-hierarchy' 2010-09-09 16:08:04 -04:00
Sam Tobin-Hochstadt
b6b840076b Lots more laziness, and useless require removal. 2010-09-09 16:08:03 -04:00
Sam Tobin-Hochstadt
de0e8bc81c Progress on delaying some environments. 2010-09-09 16:08:03 -04:00
Sam Tobin-Hochstadt
837291a793 simplify requires 2010-09-08 13:20:34 -04:00
Sam Tobin-Hochstadt
120a1d0d87 Load typechecker dynamically to reduce footprint. 2010-09-08 13:20:34 -04:00
Sam Tobin-Hochstadt
fae02be9f0 Add memory fns. 2010-09-08 11:32:04 -04:00