Commit Graph

90 Commits

Author SHA1 Message Date
Eric Dobson
f090698542 Fix type of integer-sqrt and add type for integer-sqrt/remainder. 2012-08-06 12:31:07 -04:00
Vincent St-Amour
1215fb6cec Remove invalid singleton return types.
NaN doesn't inhabit these types, but can be produced there.
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
Vincent St-Amour
b1fbbafd91 Fix type of rational?. 2012-08-03 14:21:44 -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
Vincent St-Amour
cc8a9b5ed7 Fix type for dynamic-place. 2012-07-31 17:12:30 -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
Vincent St-Amour
b1577bd307 Fix type for add-between. 2012-07-24 16:41:52 -04:00
Asumu Takikawa
e14c5d61e9 Allow guards for impersonatable struct type properties 2012-07-19 22:46:14 -04: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
Eric Dobson
779291c795 Remove special cases for - and fx- in tc-app.rkt. 2012-07-15 19:21:26 -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
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
546c12cf2a Parse (Struct t) as StructTop.
Close PR 12903.
2012-07-14 19:20:51 -04:00
Sam Tobin-Hochstadt
396b04eb86 Reduce some dependencies of Typed Racket prims. 2012-07-12 17:41:12 -04:00
Sam Tobin-Hochstadt
5ab3827b48 Delay actual initialization of type environment. 2012-07-12 17:41:12 -04: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
Neil Toronto
77655f9ade Added types for single-value sequences
Fixed some printing types
2012-07-09 19:15:35 -07: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
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
Vincent St-Amour
db6c2e7737 Update types of string-join and add-between. 2012-06-27 11:39:15 -04:00
Sam Tobin-Hochstadt
d346415903 Fix type of dynamic-place. 2012-06-25 19:20:12 -04:00
Sam Tobin-Hochstadt
794bfa50ec Load environments dynamically in residual code. 2012-06-25 18:07:45 -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
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
Vincent St-Amour
ee142047f8 Add type for range, and extend in-range's. 2012-06-22 17:53:43 -04:00
Eli Barzilay
7d6e79023c Random pickiness.
Spaces at EOFs, indentation, etc.
2012-06-22 12:00:48 -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
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