Sam Tobin-Hochstadt
9a2b74dc33
Generate trivial constraints for missing type variables.
...
If the type variable isn't mentioned anywhere, then just
pick `Any` as its substitution.
Fixes #152 .
2015-06-23 16:08:23 -04:00
Vincent St-Amour
6bef6e6ca8
Make type of abs
and magnitude
more precise.
...
Fixes a failing test.
2015-06-16 12:00:07 -05:00
Eric Dobson
0498f548c1
Fix the type of abs on negative zeros.
2015-06-16 10:43:01 -05:00
Asumu Takikawa
0892e23892
Resolve expected type in tc-lambda-unit
...
Closes #144
2015-06-10 12:23:39 -04:00
Asumu Takikawa
bc3443b393
Change Module-Path type to accommodate submodules
...
Closes #84
2015-06-10 12:21:51 -04:00
Sam Tobin-Hochstadt
91e3a1b5f0
Make sure that user-specified clauses come before default clauses in type-case
.
...
Avoids nasty hash ordering bugs.
2015-06-02 17:32:33 -04:00
Asumu Takikawa
b63514a2c3
Allow more flexible keywords in ->* types
...
Keyword argument types in ->* are now allowed intermixed with
positional arguments instead of at the end.
Closes #145
2015-06-02 01:05:05 -04:00
Eric Dobson
8014db0f7d
Make infer unfold Mu before spliting on Unions.
2015-05-19 20:44:15 -07:00
Eric Dobson
d4eaa47b27
Make subtype use hash of hashs.
...
This has a 1% improvement on new-metrics.rkt by my measurements.
2015-05-19 20:37:41 -07:00
AlexKnauth
e075523e5e
change type of partition
2015-05-19 16:29:49 -04:00
Alex Knauth
706e92ebf4
Merge pull request #133 from AlexKnauth/patch-2
...
Update .travis.yml to run more tests
2015-05-15 17:49:54 -04:00
Alex Knauth
76dffd368c
Update .travis.yml
...
with suggestion from samth here:
https://github.com/AlexKnauth/typed-racket/pull/1
2015-05-15 15:44:59 -04:00
Alexis King
a096857a88
Disable the #{} reader macro if a dispatch macro already exists on #\{
2015-05-14 14:35:30 -07:00
Sam Tobin-Hochstadt
93276d4091
Add some missing dependencies.
2015-05-14 12:13:14 -04:00
AlexKnauth
b11e48fa93
don't raise error for require/typed in module-begin context
2015-05-14 12:13:14 -04:00
Alex Knauth
c6b1f8fdc0
syntax error for require/typed in untyped code
2015-05-14 12:13:14 -04:00
Mira Leung
3a70ed5669
Update to fl>= tests
2015-05-14 12:13:14 -04:00
Mira Leung
9b88243b5c
Unit tests for fl comparison operators
2015-05-14 12:13:14 -04:00
Mira Leung
df0f9d53bd
Unit tests for fl>= typechecking
2015-05-14 12:13:14 -04:00
Eric Dobson
1e890f18be
Add support for running raco test on TR unit tests.
2015-05-14 12:13:14 -04:00
Asumu Takikawa
92d1dd1c5e
Add sealing contracts for row polymorphic types
...
This enables contract generation in the negative
direction (untyped->typed) for row polymorphic types
(basically mixin types).
Depends on `class-seal` and `class-unseal` in
the racket/class library.
2015-05-13 20:52:32 -04:00
Marc Burns
609d6189e9
Improve typecheck for private field initializers
...
This patch addresses two issues with `typed/racket/class`:
1. For multiple private fields declared with `define-values`, type
information does not propagate from the values produced by the
initialization expression to the declared fields. This breaks soundness
of private fields: A field can be annotated with a type that does not
contain the field's initial value.
This was resolved by keeping a table of temporary bindings introduced in
the expansion of the initializer along with their types. The field
setter's type is then checked against that of the corresponding
temporary.
2. The class body typechecker assumes that the `expr` of
a `define-values` clause will expand to a bare `(values vs ...)`.
This was resolved by generalizing the template for matching an expanded
`define-values` initializer and extracting the type information from the
`expr` instead of each element in `(vs ...)`.
2015-05-12 18:42:05 -04:00
Asumu Takikawa
5751a2e1cf
Refactor get-field
checking to avoid bad names
2015-05-12 15:08:53 -04:00
Eric Dobson
90061c2b96
Add filters for trivial cases in arithemetic procedures.
2015-05-02 08:26:50 -07:00
Eric Dobson
22342d6a35
Simplify flsqrt type.
2015-05-02 08:26:50 -07:00
Eric Dobson
fc4e216fc2
Simplify flexp type.
2015-05-02 08:26:50 -07:00
Eric Dobson
142b52918c
Fix types for flmin and flmax.
...
flmin and flmax only take two arguments.
2015-05-02 08:26:50 -07:00
Eric Dobson
848b69b73d
Simplify flonum comparison types.
2015-05-02 08:26:50 -07:00
Eric Dobson
d288b14244
Expand type of fl/.
2015-05-02 08:26:50 -07:00
Eric Dobson
c50b6291e2
Cleanup fl* type.
2015-05-02 08:26:50 -07:00
Eric Dobson
811cd211e9
Tighten fl+ and fl- types.
2015-05-02 08:26:49 -07:00
Eric Dobson
c3c134780e
Cleanup fx shifts.
2015-05-02 08:26:49 -07:00
Eric Dobson
3c978d82cb
Tighten fxior and fxxor.
2015-05-02 08:26:49 -07:00
Eric Dobson
424658f6ab
Tighten fxmin and fxmax.
...
Replace Zero case with all NonNegative or NonPositive values.
2015-05-02 08:26:49 -07:00
Eric Dobson
93b538b694
Cleanup types of fixnum comparisons.
...
Unify Zero and One cases, and remove extraneous ones.
2015-05-02 08:26:49 -07:00
Eric Dobson
114b9376f1
Tighten type of fxabs.
2015-05-02 08:26:49 -07:00
Eric Dobson
ad09e941a8
Tighten type of fxquotient
2015-05-02 08:26:49 -07:00
Eric Dobson
c923663e55
Tighten type of fx*
...
Make multiplication by Zero return Zero and by One return the other arg.
2015-05-02 08:26:49 -07:00
Eric Dobson
6bc24fdf83
Fixup type of fx-
...
fx- is not commutative.
Output is always a fixnum.
2015-05-02 08:26:48 -07:00
Eric Dobson
b6a53b8916
Cleanup types of fx+
...
Fix case for two Bytes which should be Index not PosIndex.
2015-05-02 08:26:48 -07:00
Eric Dobson
86d5845bc4
Replace exclude-zero with commutative-equality/strict-filter.
...
Make it more obvious what the generated type is.
Also removes NaN from the specific type for flonums because that was
incorrect.
2015-05-02 08:26:48 -07:00
Eric Dobson
69e613c831
Simplify types for nan? and infinite?
2015-05-02 08:26:48 -07:00
Eric Dobson
e91cdad6b0
Tighten types on sgn.
2015-05-02 08:26:48 -07:00
Eric Dobson
ddd503a203
Fix type on integer-sqrt/remainder.
...
It doesn't return exact integers when given inexact input.
2015-05-02 08:26:48 -07:00
Eric Dobson
eeef1a7c55
Simplify types of integer-sqrt.
2015-05-02 08:26:40 -07:00
Eric Dobson
70fdc3dd13
Make flonum and ext-flonum types use the same definitions.
...
This avoids problems where one could be changed to fix a bug and the
other would be missed.
2015-04-28 20:27:44 -07:00
Vincent St-Amour
257d4ec9a7
Fix use of values in type of integer-sqrt/remainder
.
...
Closes PR 15034.
2015-04-28 17:49:53 -04:00
Asumu Takikawa
a80f55946d
Adjust error messages for : annotation form
...
Print better error messages for expression like
(: 2 Zero). Also fix and improve error messages for
multiple/missing types.
Closes PR 15044
2015-04-21 16:07:13 -04:00
Asumu Takikawa
3e0e3a4005
Add keyword argument for get/set-argb-pixels
...
Also simplify the types for bitmap-dc% too
2015-04-14 17:53:32 -04:00
Asumu Takikawa
c3a87fc5dd
Add a type for get-display-backing-scale
2015-04-10 18:57:35 -04:00