Eric Dobson
dd078dcb95
Clean up of tc-app.rkt.
2012-07-15 19:21:26 -04:00
Eric Dobson
779291c795
Remove special cases for - and fx- in tc-app.rkt.
2012-07-15 19:21:26 -04:00
Eric Dobson
8f98bb6d92
Added cond-check-below
2012-07-15 19:21:26 -04:00
Sam Tobin-Hochstadt
8c659d50ed
Properly handle quoted constants with bad expected types.
...
Closes PR 12874.
2012-07-14 23:06:13 -04:00
Sam Tobin-Hochstadt
ccf79943ab
Fix special case for expected unions of vectors.
...
Closes PR 12845.
2012-07-14 21:56:44 -04:00
Sam Tobin-Hochstadt
2500dad8f1
Don't shortcut simple letrec
forms that aren't lambda
s.
...
Closes PR 12841.
2012-07-14 21:36:56 -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
e6697fe43f
Require binding of add-mod
.
2012-07-13 17:10:50 -04:00
Sam Tobin-Hochstadt
396b04eb86
Reduce some dependencies of Typed Racket prims.
2012-07-12 17:41:12 -04:00
Sam Tobin-Hochstadt
775dc67a3b
Rename type-decl
submodule to #%type-decl
.
2012-07-12 17:41:12 -04:00
Sam Tobin-Hochstadt
6bf141513f
Revise type environment propagation to use submodules.
...
Each typed module now defines a submodule named `type-decl`.
This module performs the type environment initialization (along
with other environment updates) when invoked. Additionall,
every typed module, when invoked, performs a for-syntax addition
to a list specifying the submodules that need invocation.
This invocation is then performed by the `#%module-begin` from
Typed Racket.
The `type-decl` module always goes at the beginning of the
expanded module, so that it's available at syntax-time for all
the other submodules. This involved adding pre- and post-
syntaxes for the results of typechecking.
This allows significant runtime dependency reduction from the
main `typed/racket` and `typed/racket/base` languages (not yet
complete).
2012-07-10 12:49:27 -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
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
a05acfee4c
Split out some small utilities to prepare to reduce dependencies.
2012-06-25 14:10:18 -04:00
Sam Tobin-Hochstadt
ccb724155a
scheme -> racket
2012-06-25 13:39:07 -04:00
Vincent St-Amour
4d5bc17f85
Recover from any failure when attempting to prune types.
2012-06-17 23:28:50 -04:00
Vincent St-Amour
a5f2ca8fb0
Fix possible-domains on functions with multiple return values.
2012-06-17 23:04:47 -04:00
Sam Tobin-Hochstadt
39e014bc55
Handle submodules in Typed Racket.
2012-06-16 22:08:06 +08:00
Vincent St-Amour
442def0b0f
Fix typechecking of Single-Flonum-Complex literals.
...
Closes PR12840.
2012-06-09 22:00:27 -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
Sam Tobin-Hochstadt
1801efe66a
Whitespace fixes.
2012-06-03 10:50:18 -04:00
Sam Tobin-Hochstadt
cbbd889621
=
can equate values with different types.
...
Closes PR 12804.
2012-06-03 10:50: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
Eric Dobson
c2d9f7ed9a
Attach struct info to constructor for polymorphic TR structs.
...
Closes PR 12806
2012-05-31 13:09:26 -04:00
Eric Dobson
735b84b083
Add support for multiple provides of the same identifier in TR.
...
Closes PR 12807.
2012-05-31 10:02:03 -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
Asumu Takikawa
abf9223203
TR: Fix type-checking of hash literals.
2012-05-23 15:49:38 -04:00
Asumu Takikawa
f4fb628934
Changing new to (eventually) concretize interface contract methods.
...
* No-op for now, but will later do more work.
* Fix up Typed Racket to handle the new do-make-object.
2012-05-04 17:24:55 -04:00
Stevie Strickland
b2bfbad240
Add special typechecking rule for expansion of (quote-module-name).
2012-05-03 19:38:47 -04:00
Eli Barzilay
f7c67b49a4
Big newline at EOF scan.
2012-02-29 00:28:11 -05:00
Eli Barzilay
c007c345f9
A bunch of more typos like the ones in David's commit.
2012-02-21 14:21:43 -05:00
Sam Tobin-Hochstadt
b4af99babb
Fix types of numerics etc with expected type.
2012-02-20 18:45:33 -05:00
Sam Tobin-Hochstadt
a8bdb9d6ce
Speed up and improve tc-literal
. Now uses expected types more, and more sensibly.
...
Closes PR 12586.
2012-02-20 15:09:51 -05:00
Sam Tobin-Hochstadt
a5c7175e46
improve types for literal hash tables
2012-02-09 17:08:48 -05:00
Vincent St-Amour
b194916ad6
Fix printing of types in instantiation error messages.
...
Closes PR 12507.
2012-02-02 16:00:16 -05:00
Ryan Culpepper
e086d237cd
moved unstable/mutated-vars back to typed-racket
2011-12-18 13:57:49 -07: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
Sam Tobin-Hochstadt
f23baef8aa
Opaque types may overlap with anything.
...
Closes PR 12434.
2011-12-09 18:11:51 -05:00
Sam Tobin-Hochstadt
706198c059
Add `typecheck-fail' form for explicit type errors.
2011-10-25 12:10:58 -07:00
Eli Barzilay
623c7493ed
Some selective #:when (not ...)' ->
#:unless ...'.
2011-09-16 10:48:18 -04:00
Matthew Flatt
d3c56c9f13
generalized `begin-for-syntax'
2011-09-08 14:06:00 -06:00
Sam Tobin-Hochstadt
41bfb878c3
Add logging to typechecker main loop.
2011-09-06 11:07:03 -04:00
Sam Tobin-Hochstadt
c25f7cea27
Micro-optimization.
2011-09-06 11:07:03 -04:00
Sam Tobin-Hochstadt
d2e1cc02dc
Move typed-scheme to typed-racket collection.
...
Compatibilty typed-scheme collection left.
2011-09-03 20:49:39 -04:00