Commit Graph

60 Commits

Author SHA1 Message Date
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
a929bb21fc Don't export internal names for define & lambda. 2012-06-16 22:08:05 +08:00
Vincent St-Amour
cff1cd3c63 Fix type of exact->inexact.
Closes PR 12803.
2012-06-12 11:09:20 -04:00
Vincent St-Amour
948a4d6184 Missed some cases in sqrt. 2012-06-09 22:11:42 -04:00
Vincent St-Amour
53746ca0a5 Fix type of fl/ to reflect changes to /. 2012-06-09 22:07:03 -04:00
Vincent St-Amour
5d26fd10e6 Subtraction is not commutative. 2012-06-09 22:04:43 -04:00
Vincent St-Amour
7191ef5c74 Be more conservative about returning Float-Complex and others. 2012-06-09 21:57:01 -04:00
Vincent St-Amour
f3f5abd1f7 Improve handling of NaN in division.
Closes PR12838.
2012-06-09 21:32:37 -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
Vincent St-Amour
0f346601f4 Fix type of n-ary * to handle NaN properly. 2012-06-06 18:26:51 -04:00
Vincent St-Amour
48f47f3384 Fix flonum and single-flonum operation types.
Most issues were found with random testing.
2012-06-06 18:26:51 -04: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
Sam Tobin-Hochstadt
8459c22c01 Improve type of identity.
Closes PR 12813.
2012-06-02 18:52:18 -04: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
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
Vincent St-Amour
186b463217 Fix NaN and inf handling in flonum specific op types. 2012-05-25 17:15:22 -04:00
Vincent St-Amour
ebcc6d211a Fix handling of NaN and infinities.
Most of these were found through random testing.
2012-05-25 17:15:22 -04:00
Vincent St-Amour
b6a7a0c505 Add reminder that unsafe-flexpt is currently the same as flexpt. 2012-05-25 17:15:22 -04:00
Vincent St-Amour
e786149434 More precise type for flexpt. 2012-05-08 11:42:21 -04:00
Vincent St-Amour
95c2115799 Fix prims.rkt's type->contract to accept keyword arguments.
Necessary when some prims are used at the top-level.
2012-05-08 11:16:27 -04:00
Matthew Flatt
9a41129c69 racket/flonum: add `flexpt' 2012-05-07 20:41:14 -06:00
Vincent St-Amour
8cbd26899f Include both float zeroes in Non-Negative and Non-Positive types.
Closes PR12706.
2012-04-16 17:51:04 -04:00
Vincent St-Amour
f3bbe1914d Improve type for expt. 2012-04-08 13:08:17 -04:00
Vincent St-Amour
e26201b4f6 Fix type of * with no arguments.
Closes PR 12679.
2012-04-05 19:18:20 -04:00
Vincent St-Amour
69899c33fc Fix type of expt.
Closes PR 12660.
2012-03-29 15:39:24 -04:00
Sam Tobin-Hochstadt
a39001911c Improve filter for `path-string?'. 2012-03-24 16:04:08 -04:00
Sam Tobin-Hochstadt
56120d9697 Fix types for regexp-match*' and regexp-match-positions*'.
Note that the keyword arguments themselves are not yet typed.
2012-03-19 15:59:34 -04:00
Vincent St-Amour
e71fa0be88 Add typed for missing finum/flonum conversions. 2012-02-18 23:38:32 -05:00
Vincent St-Amour
593e4a4f1d Provide require/typed/provide and require-typed-struct/provide from TR. 2012-02-10 11:30:20 -05:00
Sam Tobin-Hochstadt
38e7fb5eb0 Relax type of `filter'. 2012-02-09 17:08:48 -05:00
Sam Tobin-Hochstadt
7c1c0c96c0 Fix type of `raise'.
Closes PR 12525.
2012-02-01 20:25:05 -05:00
Vincent St-Amour
1b6cf730c3 Fix type of expt.
Closes PR 12526.
2012-02-01 16:50:40 -05:00
Sam Tobin-Hochstadt
c16e48a083 Fix internal constructor name for struct:' so that struct-out' works.
Closes PR 12447
Related to PR 12516
2012-01-28 09:47:15 -05:00
Sam Tobin-Hochstadt
f3e3eb10ad Fix type of `memf' to be more permissive. 2012-01-28 09:47:15 -05:00
Vincent St-Amour
ca11c2e4fa Add an alternate name for case->. 2012-01-13 11:28:36 -05:00
Vincent St-Amour
f50008280b Export Negative-Fixnum. 2012-01-06 13:19:14 -05:00
Vincent St-Amour
4556ea2992 Fix log's type for Real inputs. 2012-01-06 13:19:14 -05:00
Sam Tobin-Hochstadt
81bb8a5ea3 Improve type of `in-range'. 2011-12-19 19:41:45 -05:00
Sam Tobin-Hochstadt
7802eda605 Better types for fourth' -- tenth'. 2011-12-14 19:06:05 -05:00
Sam Tobin-Hochstadt
eb38783750 Fix type of `remove-duplicates'.
Also fix type inference for functions with mandatory keyword arguments in other cases.
Related to PR 12434.
2011-12-10 17:28:34 -05:00
Vincent St-Amour
b5d393d939 Add TR support for gcd and lcm on rationals. 2011-12-08 17:13:50 -05:00
Sam Tobin-Hochstadt
821ec051d0 Avoid providing internal macro. 2011-12-03 18:46:01 -05:00
Vincent St-Amour
9417503492 Fix for/sum: when summing something other than integers. 2011-12-02 15:21:14 -05:00
Vincent St-Amour
3279ea4b61 Whitespace cleanup. 2011-12-02 15:21:14 -05:00
Vincent St-Amour
8509b81f47 Allow integers as sequences in TR. 2011-11-30 17:54:27 -05:00
Vincent St-Amour
0a3a71fbbc Refine types of integer-bytes->integer' and arithmetic-shift'. 2011-11-15 15:31:07 -05:00
Sam Tobin-Hochstadt
3caf08da43 Fix curried function type parsing without (). 2011-10-28 15:43:29 -04:00
Sam Tobin-Hochstadt
706198c059 Add `typecheck-fail' form for explicit type errors. 2011-10-25 12:10:58 -07:00
Matthew Flatt
ec380e34ed remove built-in reader and printing support for Honu
This is a backward-incompatible change, but I think it's
unlikely that any code depends on the removed bindings
or reader syntax.
2011-10-05 09:40:27 -06:00
Matthew Flatt
0197902309 add var-ref->mod-decl-insp' and switch cur-code-insp' uses
Macros and other tools that need syntax privilege used
`(current-code-inspector)' at the module top-level to try to
capture the right code inspector at load time. It's more
consistent to instead use the enclosing module's declaration-time
inspector, and `var-ref->mod-decl-insp' provides that. The
new function works only on references to anonymous variables,
which limits access to the inspector.

The real function name is longer, of course.
2011-09-20 13:50:36 -06:00