Commit Graph

560 Commits

Author SHA1 Message Date
Vincent St-Amour
f8b7eb8073 Add a case-> type-constructor as a synonym for case-lambda.
original commit: 1b3052748e3278deefabf646f4990dc1f8064202
2011-01-31 16:39:20 -05:00
Vincent St-Amour
2b933e4436 Remove some legacy bindings.
original commit: d65438c9ea1bacce33579c81cc0e22120ab64f5d
2011-01-31 16:39:19 -05:00
Vincent St-Amour
185e8c4d0b Cleanup of exposed base types.
original commit: 22391be437d61fbbe7a1f19b2a2ded393b7afb55
2011-01-31 16:39:19 -05:00
Vincent St-Amour
c0970cc647 Small-Float -> Single-Flonum
original commit: f1c6c74284fd913ab8231426bcf1206bcf259f77
2011-01-31 16:39:18 -05:00
Vincent St-Amour
f642a6ce6d Added the new single-precision float function to TR.
original commit: 4ac36fd59bc35cb0d60cb050cfaae21d213064c8
2011-01-31 16:39:18 -05:00
Vincent St-Amour
0e7bf2be4f Update base-env-indexing to use the new types.
original commit: b26531774b6943e73f4b285b827432200b18a433
2011-01-31 16:39:15 -05:00
Vincent St-Amour
956a1533c8 Fix TR tests.
original commit: a0a54b231db5c81e9ab66302399b6adc660b701f
2011-01-31 16:39:14 -05:00
Vincent St-Amour
3d6b5893ba 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.

original commit: e56663c943fe4ae355b6d626d3c84b6ec8ea7fd1
2011-01-31 16:39:13 -05:00
Vincent St-Amour
881a3d31e7 Avoid generating large contracts for common numeric types.
original commit: 3e27ed607c983bd26d3ccf0c98f4504b86b1642d
2011-01-31 16:39:13 -05:00
Vincent St-Amour
d5941cb2d6 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.

original commit: d4c93cc12e6df893ba2e782f0e0ea5529738315a
2011-01-31 16:39:13 -05:00
Sam Tobin-Hochstadt
bcb395b986 Fix type of `-'
original commit: 463ab0d30943f5453eaac16e1d966dd9dae093eb
2010-12-08 19:31:57 -05:00
Sam Tobin-Hochstadt
eacda65291 Add `defined?' assertions to fix DrRacket.
original commit: e70ccafd7b591df218a1ae036f599c671eb57824
2010-12-08 18:53:56 -05:00
Sam Tobin-Hochstadt
1527fba4b3 Allow arbitrary filter specification in function types.
Allow (A -> B -> C) for curried function types.

original commit: 87eab889d68dd46bfd5b0f4d79942bc104cb3da2
2010-12-08 18:22:29 -05:00
Sam Tobin-Hochstadt
05e1489dfb Better handling of `hash-*' functions, and hashes as sequences.
original commit: 73dbf42e0e6fb750d871060d6ed34adf6e207eec
2010-12-08 18:22:29 -05:00
Vincent St-Amour
5acfe5b67d Take into account potentially undefined values in letrec.
Closes PR11511.

original commit: dc2df4882b6abca46839ace724924df5ab0d7707
2010-12-08 18:17:06 -05:00
Vincent St-Amour
d7a8f14636 Fix type for abs. Closes PR 11430.
original commit: e7c252739ddab37973cf3c013660d6c2244c44b8
2010-11-23 14:15:04 -05:00
Vincent St-Amour
26a2fd0163 Add type for fl->exact-integer. Closes PR 11429.
original commit: 54991835d603a81ddaee6845e4930bfe0ab9de24
2010-11-23 14:15:04 -05:00
Vincent St-Amour
8d3499453f Fix type for arithmetic-shift. Closes PR 11428.
original commit: 58d1f75dc1b1e2d9c17427641fa6f295aec96706
2010-11-23 14:15:03 -05:00
Vincent St-Amour
67eb57c526 Add type for integer-sqrt. Closes PR 11427.
original commit: 7a7fe577cd464c80b4b344aef4a072c25c7652fa
2010-11-23 14:15:03 -05:00
Vincent St-Amour
b9303a1f4b Fix type for raise-type-error. Closes PR 11426.
original commit: e10f139ad82748ee5d6b959c1f6225886b41084d
2010-11-23 14:15:03 -05:00
Vincent St-Amour
44e1994364 More precise type for sgn. Closes PR 11424.
original commit: 2c74984fcd442fd73802244801946e2d4dd8ba8c
2010-11-23 14:15:02 -05:00
Vincent St-Amour
b5d29776df Add optional argument to make-hash and co.
original commit: c633913b9484c623ca6e56c7b485613c9d60716b
2010-10-27 16:15:50 -04:00
Sam Tobin-Hochstadt
db3c6bbbe0 Avoid dumb parsing bugs in require/typed.
original commit: 561fdc8db580c828a45dc27c4ca61b21dccad311
2010-10-26 18:09:45 -04:00
Vincent St-Amour
9b5a5a6bb5 Fix opt-lambda:. Merge to 5.0.2.
original commit: a15236ea4f1ba84c9351632e9469e1cd34b5375b
2010-10-20 14:32:37 -04:00
Sam Tobin-Hochstadt
f0fad4383a Add type for `compose'
original commit: 24bddafa82e28a3eee675c1ad99ae1dcde59d46a
2010-10-14 11:44:14 -04:00
Vincent St-Amour
1a4e176824 Inexact-Complex -> Float-Complex
original commit: 27e722f27b673cbfcee60aaba75dfdcab7e396c5
2010-10-12 16:47:46 -04:00
Vincent St-Amour
c547da857e Added the Float-Complex type for consistency with the new float types.
Inexact-Complex has been kept as a synonym for backward compatibility.

original commit: 52bd739d00491d2a78b62c6d6e89fb5eaf6ae046
2010-10-12 16:47:45 -04:00
Vincent St-Amour
92b3f9af03 Changed the TR numeric tower to use the new flonums.
original commit: a59a99c42dffec38be98f3c0449097c80bad40fe
2010-10-12 16:47:45 -04:00
Stevie Strickland
dbdb62fc7b Convert vectorof/vector-immutableof to the new regime.
Also add old-style vectorof to mzlib/contract.

original commit: 3028f2d1424123d076a95572a7564b8fb069a86e
2010-09-16 15:04:41 -04:00
Vincent St-Amour
ef623a46b6 Made annotations optional for let: and variants.
original commit: 8aab96faa6cac4fd20b7464693152d1f9a3ad106
2010-09-16 13:24:10 -04:00
Vincent St-Amour
cc871deebb Made some type annotations optional in the for: macros.
original commit: 9f87b5a7e6a2034a4d936bd2cc8e67632f8c6e3b
2010-09-15 20:21:51 -04:00
Vincent St-Amour
b03abef7ff 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.

original commit: a10d145f25dd4257dd216ea0b1e97184a29c7683
2010-09-15 20:21:50 -04:00
Stevie Strickland
e7e187e1de 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).

original commit: 994ad6d10fc817a5ceca2f9f4874dac5c14c0aab
2010-09-15 16:57:17 -04:00
Sam Tobin-Hochstadt
8a568284b9 Add some file primitives.
original commit: 5789981f2c4756f2f6cd066ac6f28555dc57e1fd
2010-09-10 18:29:34 -04:00
Sam Tobin-Hochstadt
e0b7b06a21 Add `require' to fix tests.
original commit: 0ae9e0ff851a1d5835ac8ab1eb1bd1a0b7ab3c8c
2010-09-09 16:08:04 -04:00
Sam Tobin-Hochstadt
df6cce314c Avoid printing results of `define-hierarchy'
original commit: bc6d8f98ed08e1f70f1b3ea255869b06533d2372
2010-09-09 16:08:04 -04:00
Sam Tobin-Hochstadt
e717d29b74 Lots more laziness, and useless require removal.
original commit: b6b840076b275d653843400f18259bf7f67c7a53
2010-09-09 16:08:03 -04:00
Sam Tobin-Hochstadt
63748f9460 Progress on delaying some environments.
original commit: de0e8bc81ce566d9a540832f794d96b2cf9409ce
2010-09-09 16:08:03 -04:00
Sam Tobin-Hochstadt
54763a9ca3 simplify requires
original commit: 837291a793bd9602af16404db1b4fc49e639021f
2010-09-08 13:20:34 -04:00
Sam Tobin-Hochstadt
72a11f2d56 Load typechecker dynamically to reduce footprint.
original commit: 120a1d0d87824f90b153047cc3a5408a60753b65
2010-09-08 13:20:34 -04:00
Sam Tobin-Hochstadt
1503fed8c3 Add memory fns.
original commit: fae02be9f06aefd55c65211d2e95a07041ebfede
2010-09-08 11:32:04 -04:00
Sam Tobin-Hochstadt
fba3c3b9ca Propogate #:mutable for polymorphic structs.
Closes PR 11127

original commit: a0e77705e578927e5d8180e6bc811461173580ab
2010-09-08 10:47:51 -04:00
Sam Tobin-Hochstadt
4bf64acde5 Fix polymorphic structs with mutability.
original commit: 6130f3551c1019c1bc035d802378c29bf574a0c1
2010-09-08 10:24:58 -04:00
Sam Tobin-Hochstadt
617496f14e Make syntax of #{} less accepting of errors.
original commit: 91fefa055ea0b0fda8ae8bffb993bc163e4160af
2010-09-08 10:24:58 -04:00
Stevie Strickland
3e6ab819c6 Check struct predicate before checking fields.
original commit: 3b0de9c141edee84be57768a22b1ae3264fcc7f5
2010-09-02 19:59:00 -04:00
Sam Tobin-Hochstadt
01fd7f5b8c Use `any/c' for contracts for polymorphic functions.
original commit: 92ce3ca02d448df97ba8e9e2210a898848cae0f1
2010-08-27 18:36:49 -04:00
Vincent St-Amour
f360fac138 Added annotations to plain for and for* in typed code.
original commit: d3ee52d4514170b514faecb80b5c939bf7da3aea
2010-08-27 18:18:52 -04:00
Vincent St-Amour
acd7b572ae Added with-asserts, from code from Neil Toronto.
original commit: ea472a9d57b7344e9111bd37663fd7ad0884f0d5
2010-08-26 17:46:58 -04:00
Vincent St-Amour
ee39b520ce Extend sign analysis to sqr.
original commit: 694d2da4b362f83b6f492095c712703856acb068
2010-08-26 17:46:57 -04:00
Eli Barzilay
8ab581cf2e Change a bunch of "~%" and "~n" in format strings to "\n".
original commit: 7dc4d2e5a63ab416d90e44d7bf75cb5593329909
2010-08-25 17:17:01 -04:00