AlexKnauth
aec5fad4be
make append preserve non-emptyness of first argument
...
see https://github.com/racket/scribble/pull/8#discussion_r33423152
2015-06-28 12:07:42 -04:00
Sam Tobin-Hochstadt
90dd27bfd8
Fix update-implies error.
2015-06-23 16:21:37 -04:00
Sam Tobin-Hochstadt
77f8316eaa
Reduce dependencies.
2015-06-23 16:09:09 -04:00
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
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
AlexKnauth
e075523e5e
change type of partition
2015-05-19 16:29:49 -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
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
Eric Dobson
90061c2b96
Add filters for trivial cases in arithemetic procedures.
2015-05-02 08:26:50 -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
Andrew Kent
cbbf5536d8
no objects for mutated private class fields
...
tidy up ->acc
2015-04-08 17:53:00 -04:00
Eric Dobson
f0c48cfb87
Make abs return its argument on -NonNegReal.
2015-04-07 09:50:33 -07:00
Eric Dobson
a522768b7e
Make tc-subst restrict returned types based on argument types.
2015-04-07 09:50:32 -07:00
Eric Dobson
7a29e8e369
Simplify cases in comparisons with -Zero or -RealZero
2015-04-07 08:23:32 -07:00
Eric Dobson
1ad0a2b181
Remove extra cases in comparisons for -One
2015-04-07 08:23:32 -07:00
Eric Dobson
b77bd862a0
Stop trying to represent rest objects because they are currently broken.
...
Closes #83 .
2015-04-07 08:13:38 -07:00
Eric Dobson
a33b27a3c9
Remove many cases of = that are unnecessary.
2015-04-05 19:10:51 -07:00
Eric Dobson
7b762933c6
Simplify the type of zero?.
2015-04-05 19:07:12 -07:00
Eric Dobson
be225976d3
Make subtype work with restricted filters.
...
Closes PR 15025.
2015-04-05 19:07:12 -07:00
Asumu Takikawa
7b5478e0bc
Make Place-Channel <: (Evtof Any)
2015-04-02 11:00:25 -04:00
Asumu Takikawa
c70910aaa0
Fix type restriction in values->tc-results
...
Previously the restriction didn't account for traversing
the object type with the given path. This also relies on
the previous commit that adds subtyping on filters.
(because this change seems to introduce filters which
only differ by an unrolling of a recursive type, but
the old subtyping only worked for identical types)
2015-04-02 10:58:45 -04:00
Asumu Takikawa
8acc86bb9b
Add subtyping for types inside filters
...
This makes a type like
(-> Any Boolean : #:+ Integer)
a subtype of a type like
(-> Any Boolean : #:+ Number)
For not filters, the direction is reversed.
2015-04-01 18:54:00 -04:00
Eric Dobson
889d96ca78
Strengthen infinity checks in comparison operations.
...
This adds checks for infinity when comparing against reals and accounts
for NaNs.
2015-03-30 09:25:48 -07:00
Eric Dobson
3889036b12
Simplify types for positive? and negative?.
2015-03-30 09:12:51 -07:00
Eric Dobson
5de22c80f7
Make values->tc-results restrict to the original type of the object.
2015-03-30 09:12:25 -07:00
Eric Dobson
e5ea1f4bb6
Make zero? sound with regards to NaN.
2015-03-28 14:08:20 -07:00
Alexis King
b54d8dc04a
Strengthen the types for member, memv, memq, and memf
...
Fixes #61 .
2015-03-25 16:44:42 -07:00
Vincent St-Amour
b3bdb40ab7
Optimize pair operations, even in the absence of syntactic pair types.
2015-03-24 16:47:06 -04:00
Alexis King
aab2d9efcf
Include more specific types for integers converted to floats
2015-03-19 18:54:11 -07:00
Asumu Takikawa
7a09bac1e3
Handle more cases for opt-arg function contracts
...
Allow more cases that are allowed for ordinary function
contracts and explicitly error instead of internal errors
for other cases.
Closes Github Issue #50
2015-03-17 15:52:21 -04:00
Asumu Takikawa
1e44bee956
Fix contract test form for the failure case
...
This hadn't been updated for recent contract changes but
hadn't been noticed since it only breaks on failing tests.
2015-03-17 15:52:21 -04:00
Asumu Takikawa
8106d318f1
Fix first-order check for TR's opaque object/c
...
Closes PR 15003
2015-03-13 16:52:34 -04:00
Asumu Takikawa
1999d0251b
Allow #lang typed/racket/gui and add base module
...
This aligns the library structure of typed/racket/gui
to racket/gui.
2015-03-12 17:27:59 -04:00
Asumu Takikawa
8e6710438f
Support prefabs for unsafe-struct-ref
2015-03-10 15:18:02 -04:00
Asumu Takikawa
5d708ab53f
Add typechecking for prefab structs
...
Adds a new Prefab type constructor along with support for
the use of `struct` with the #:prefab keyword.
2015-03-10 15:14:51 -04:00
Asumu Takikawa
57a76517fc
Enable environment extension in unit tests
...
This allows a unit test like tc-e to extend the lexical
type environment when checking the test expression.
2015-03-09 15:59:02 -04:00
Asumu Takikawa
96e741dc1b
Add srcloc instead of a quoted syntax for casts
2015-03-06 16:09:31 -05:00
Sam Tobin-Hochstadt
a3e25231a6
Look up unrenamed versions of type aliases as well.
...
Fixes bug reported by Alexander Knauth.
2015-03-06 12:13:40 -05:00