Commit Graph

115 Commits

Author SHA1 Message Date
Eric Dobson
788b046549 Make expt type more correct.
Closes PR13170.
2012-10-14 15:44:54 -04:00
Sam Tobin-Hochstadt
9054d0db7d Allow #:opaque and #:struct in require/typed. 2012-10-08 16:30:43 -04:00
Sam Tobin-Hochstadt
724aee0188 Add type for in-directory. 2012-10-07 17:45:09 -04:00
Sam Tobin-Hochstadt
d84631bc6f Don't provide internal identifier. 2012-09-27 18:29:43 -04:00
Sam Tobin-Hochstadt
ee4ba2e3dd Fix define-typed-struct/exec to pass struct-info. 2012-09-27 17:08:49 -04:00
Eric Dobson
9e1cf579a4 Fix type->contract on structures. Now uses struct/c. 2012-09-27 16:22:21 -04:00
Vincent St-Amour
adceb4322a Integers include inexact single-float integers.
Closes PR13103.
2012-09-09 15:46:29 -04:00
Vincent St-Amour
729d154deb Fix types of comparisons between zero and non-negative integer types. 2012-09-08 18:51:38 -04:00
Matthew Flatt
b61f3f751c port position-tracking clean-ups
Add `file-position*', which can return #f instead of raising
an exception when a port's position is unknown. Change
`make-input-port' and `make-output-port' to accept more
kinds of values as the initial position.

These changes make it possible to synchronize a port's
position with a `port-commit-peeked' action. It's ugly,
which I think reflect something broken about position
tracking in the port protocol (which seems difficult to fix
without breaking compaibility).
2012-08-28 16:04:41 -06:00
Sam Tobin-Hochstadt
5fb4819703 Add type for processor-count. 2012-08-20 14:49:11 -04:00
Eric Dobson
b9408e545e Wrap generated code in #%expression.
This allows tc-toplevel to hand it off to tc-expr, and not reimplement
the details of annotations.
2012-08-20 12:39:41 -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
Eric Dobson
553c3a4f80 Added cast operator to typed racket 2012-08-20 12:39:40 -04:00
Eric Dobson
cc52e56fe6 Add way for code to attach typechecks to itself, and implemented make-predicate. 2012-08-20 12:39:40 -04:00
Eric Dobson
a408d6bfbf Cleanup builtin structs types. 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
Vincent St-Amour
f514550300 Fix type of expt.
Closes PR13026.
2012-08-14 14:37:18 -04:00
Vincent St-Amour
af8fc1f26a Fix types of magnitude and angle.
Closes PR13025.
2012-08-14 14:37:18 -04:00
Ray Racine
2ff1927f6c Add flvector-copy to TR base env. 2012-08-13 16:58:29 -04:00
Vincent St-Amour
7c6cf0fa8b Fix type of division. 2012-08-10 18:07:38 -04:00
Vincent St-Amour
674c71103b Add :query-type/args.
Shows return type for a given function with given argument types.
2012-08-07 16:33:31 -04:00
Vincent St-Amour
d87339d414 :query-result-type -> :query-type/result
Result type is given, not asked for.
2012-08-07 16:31:52 -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
6dbc054e41 Replaced references to abbrev.rkt with convenience.rkt.
Skipped this for subtype.rkt, because of a require loop caused by
lazy-require.
2012-08-07 15:50:50 -04:00
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