Commit Graph

309 Commits

Author SHA1 Message Date
Vincent St-Amour
249ae295e8 DrDr has a different FPU than I do. 2015-11-09 21:36:28 -06:00
Sam Tobin-Hochstadt
da574a47d0 Handle in-vector with range arguments.
* Add `normalise-inputs` to special function env.
* Treat eta-expansion specially. Now
    `(lambda (x ...) (f x ...))`
  will typecheck like `f` but with a type restricted to
  the size of `x ...`.

  Currently, this special case only works for non-polymorphic
  functions.
2015-11-09 19:04:14 -05:00
ben
5d4477d08d safe & efficient (-> Any Boolean) contract
New strategy for compiling the (-> Any Boolean) type to a contract.
When possible, uses `struct-predicate-procedure?` instead of
 wrapping in `(-> any-wrap/c boolean?)`.
Makes exceptions for untyped chaperones/impersonators over struct predicates;
 those are always wrapped with `(-> any-wrap/c boolean?)`.

This change also affects (require/typed ... [#:struct ...]), but not #:opaque
2015-11-09 19:04:02 -05:00
Georges Dupéron
67bd07a84a Fixes type of member and assoc, plus some tests for them. See github bug #223: “(member) has wrong type, exploiting the hole causes segfault”. 2015-11-09 19:04:02 -05:00
Vincent St-Amour
177fdb9684 More drdr-found counterexamples.
All fixed already, but were found before I pushed the fixes.
2015-11-09 17:24:12 -06:00
Vincent St-Amour
65b6d3e019 Abstract over operations properly.
Found using random testing.
2015-11-09 17:16:10 -06:00
Vincent St-Amour
7346abf91c Preserve sign better in real-complex ops.
Found using random testing.
2015-11-09 17:16:10 -06:00
Vincent St-Amour
db79beaf12 Actual fix for not suppressing divide-by-0 errors. 2015-11-09 17:16:10 -06:00
Vincent St-Amour
63e26cf17a Avoid suppressing divide-by-0 errors. 2015-11-09 17:16:09 -06:00
Vincent St-Amour
6a2c8ca9f7 Fix the fix to flexpt. 2015-11-09 17:16:09 -06:00
Vincent St-Amour
5fe4e6b03f Add missing coercion. 2015-11-09 17:16:09 -06:00
Vincent St-Amour
0b2ae25c92 Propagate fix to division.
Found using random testing, at least twice.
2015-11-09 17:16:09 -06:00
Vincent St-Amour
7ef06f74c9 Extend this handling to multiplication.
Found using random testing.
2015-11-09 17:16:09 -06:00
Vincent St-Amour
b101d396a3 Avoid premature float conversions.
Found using random testing.
2015-11-09 17:16:09 -06:00
Vincent St-Amour
7ba1ab6e51 Use correct imaginary binding.
Fixes 13 bugs found using random testing.
2015-11-09 17:16:09 -06:00
Vincent St-Amour
b6e6a6fa98 Add test for real-complex interaction. 2015-11-09 17:16:09 -06:00
Vincent St-Amour
f2bb83b012 That bug has been fixed. 2015-11-09 17:16:09 -06:00
Vincent St-Amour
46f2ed95d3 Fix tests for more conservative types. 2015-11-09 17:16:08 -06:00
Vincent St-Amour
9385f6e350 Yet another fix for expt and complexes.
Found using random testing. Found once.
2015-11-09 17:16:08 -06:00
Vincent St-Amour
5ce00a90d2 Fix sign property of n-ary division.
Found using random testing. Found 4 times.
2015-11-09 17:16:08 -06:00
Vincent St-Amour
23de6a654e Fix another NaN case in expt.
Found using random testing. Found 3 times.
2015-11-09 17:16:08 -06:00
Vincent St-Amour
3ef8fe1739 Fix type of expt for bignums that get converted to infinity.
Found using random testing. Found 10 times.
2015-11-09 17:16:08 -06:00
Vincent St-Amour
a0ef6b1d8c Fix type of expt.
Found using random testing. Found 10 times.
2015-11-09 17:16:08 -06:00
Vincent St-Amour
ef80d61ae9 Fix port interleaving. 2015-11-09 17:16:08 -06:00
Vincent St-Amour
16a18d7648 Fix type of flexpt.
Found using random testing. Found 9 times.
2015-11-09 17:16:08 -06:00
Vincent St-Amour
bd12a1b928 Add a regression test suite with historical counterexamples found by DrDr. 2015-11-09 17:16:08 -06:00
Sam Tobin-Hochstadt
37bfd24a0b Add test for or/c problem. 2015-11-06 14:35:46 -05:00
Vincent St-Amour
e4edf7a9ee Remove tests made obsolete by safety improvements. 2015-11-03 18:04:44 -06:00
Vincent St-Amour
89a06cfae6 Fix bitwise-and on negative numbers.
Found using random testing.
2015-11-03 16:02:05 -06:00
Vincent St-Amour
58e97f83ea Fix sign propagation for division.
Found using random testing.
2015-11-03 15:47:32 -06:00
Vincent St-Amour
da97da5ff8 Fix type of expt when mixing floats and float complexes.
Found using random testing.
2015-11-02 19:31:00 -06:00
Vincent St-Amour
ca9306bb1d Use more precise notion of "real argument" for multiplication too.
Found using random testing.
2015-11-02 19:31:00 -06:00
Vincent St-Amour
e47ffeb0e8 Fix interaction of sign and underflow in fl/.
Found using random testing.
2015-11-02 19:31:00 -06:00
Vincent St-Amour
a3d29d9e03 Align float-complex/float division with Racket more.
Found using random testing.
2015-11-02 19:30:59 -06:00
Sam Tobin-Hochstadt
cb35383143 Add test case for issue #215. 2015-11-02 14:49:25 -05:00
Daniel Feltey
d7ae7dbdd8 Fix incorrect serialization of signature environment
Closes #229
2015-10-29 01:35:33 -05:00
Asumu Takikawa
9b8b525d42 Make unit test less noisy 2015-10-24 04:13:47 -04:00
Asumu Takikawa
2479dffde0 Fix #:opaque require clauses at the top-level 2015-10-21 17:23:24 -04:00
Asumu Takikawa
5fa40de546 Avoid ignoring class/unit forms at the top-level
Possibly a better long-term solution (for after the release)
is to not use the ignore property here and instead just use the
ignore table.
2015-10-21 13:33:30 -04:00
Asumu Takikawa
c3a59ee1c4 Use protect-out for unsafe operations
Disallows usage in sandboxes and similar contexts
2015-10-20 18:00:35 -04:00
Sam Tobin-Hochstadt
6aa635d740 Fix equality handling on literals.
Repairs eb93a2b571 and closes #215.
2015-10-20 15:56:07 -04:00
Asumu Takikawa
b5dc5585be Fix part of GH issue #208
For private `define-values` in classes with multiple variables, don't
eagerly throw type errors in the synthesis step. Instead, wait
until the later checking step when the environment will be correctly
set up.

When the initial synthesis typecheck fails, yield type Any for
the environment. If the typecheck should really fail, this is ok. If
not, then the user can add a type annotation.

A better long-term strategy is to change the handling of environments
so that the type environment gets refined as definitions are checked.
This way all annotations that the user writes are factored into the
initial environment and unannotated variables will have their types
synthesized.
2015-10-20 14:06:32 -04:00
Vincent St-Amour
59a61cc732 Fix tests. 2015-10-19 16:23:26 -05:00
Vincent St-Amour
4aed44370d Ignore more code that has no types. 2015-10-19 16:23:26 -05:00
Vincent St-Amour
6245807b7c Log uses of float vectors.
For OC to recommend using flvectors instead.
2015-10-19 16:23:26 -05:00
Vincent St-Amour
6ccb0939f8 Have optimizer skip more code that is not typechecked. 2015-10-19 16:23:26 -05:00
Asumu Takikawa
3149b0a305 Fix send on a receiver with recursive type
Thanks to Matthias for finding the bug
2015-10-19 16:27:11 -04:00
Asumu Takikawa
638618ae40 Fix unsafe-require/typed for kw functions 2015-10-16 15:52:21 -04:00
Sam Tobin-Hochstadt
3d91ebeb4c Increase timeout instead of removing it.
Having no timeout definition reverts to the default, which is 90 seconds.
2015-10-16 11:48:28 -04:00
Vincent St-Amour
b40cde6b67 Remove stray timeout.
The random tester has its own timeout, which doesn't cause drdr to error.
2015-10-16 10:20:32 -05:00
Vincent St-Amour
98f90cce2c Ignore random testing running out of resources.
Evaluating random bignum expressions sometimes goes off the rails.
2015-10-06 11:44:27 -05:00
Asumu Takikawa
bf3f86a2b0 Add a performance test for function contracts 2015-10-01 18:04:20 -04:00
Asumu Takikawa
ef6d82e81f Add a test for top-level unsafe-require/typed 2015-10-01 17:41:03 -04:00
Vincent St-Amour
913ef6a2ef Ensure a minimum of actually random testing.
Previously, most of it was actually deterministic enumeration, which meant
repeating the same tests over and over again. We still want to run those,
if only to catch regressions, so now we run both enumeration and truly
random tests, separately.

This does mean that the set of tests being run for a given seed is not the
same as it used to, so old seeds won't give the same results as before.
2015-10-01 13:57:35 -05:00
Asumu Takikawa
e8820503e7 Fix source location tracking for top-level forms
This had broken due to trampoline-based refactoring
2015-09-30 17:03:22 -04:00
Asumu Takikawa
2cbadeaccc Bump version for typed/racket/unsafe addition
Also add history annotations to docs
2015-09-30 15:37:02 -04:00
Asumu Takikawa
eb90cd4e8c Add a typed/racket/unsafe library.
Comes with `unsafe-require/typed` and `unsafe-provide`.
These operations do not generate contracts but are not
exported by default by Typed Racket.
2015-09-29 18:48:08 -04:00
Asumu Takikawa
eb93a2b571 Improve typechecking for equality
Closes GH issue #164
2015-09-22 22:57:18 -04:00
Daniel Feltey
93b9390e3b Fix Unit integration tests to match AnyValues in error messages 2015-09-11 15:43:51 -05:00
Vincent St-Amour
5ed30d7fcf Fix contract build. 2015-09-11 13:12:49 -05:00
Daniel Feltey
2e0cc095c7 Initial support for typed units in typed racket.
Most unit forms are supported, including most of the "infer" forms that
infer imports/exports/linkages from the current context.

Notably, none of the structural linking forms for units are supported, and
`define-unit-binding` is also currently unsupported.
2015-09-10 16:32:11 -05:00
Asumu Takikawa
2b2e87010a Update version dependency on base
Depends on the rename transformer change
2015-09-09 11:59:43 -04:00
Alexis King
4bf3479776 Add types for writeln and println 2015-09-08 15:58:07 -04:00
Asumu Takikawa
241f04bcdb Fix typed provide uses in some modules
When identifiers provided by typed modules were used in
certain submodules of the form (module* n #f ...) or were
used by modules implemented in a language defined by TR,
the wrong redirection was used in the expansion.

The reason was because TR's identifier redirection decided
whether it was in a typed or untyped context at module visit
time, but that's too early in the cases above.

(because TR's #%module-begin may not have begun expanding yet)

The fix uses a rename-transformer that delays the decision
to use the typed or untyped identifier until expansion time.

Closes GH issue #163 and #181

Closes PR 15118
2015-09-08 15:53:34 -04:00
Asumu Takikawa
552f509102 Refactor the renamer module
Moves `get-alternate` since its only user is the require-contract
module. In addition, it appears that one of the cases in the
conditional in its body is unnecessary. This likely means that
the extra machinery for typed-renamers are not needed at all.

Also adds a test for `require/typed` of a typed module
2015-09-08 13:31:02 -04:00
Vincent St-Amour
fd3941c062 Remove dependency on unstable/contract. 2015-09-07 21:38:22 -05:00
Vincent St-Amour
fbf200c034 Use 2d instead of unstable/2d. 2015-09-07 19:13:50 -05:00
Brian Lachance
77334808a8 Allow AnyValues as a return type in user code
Closes PR 14217
2015-09-07 13:26:34 -05:00
Vincent St-Amour
602223e74a Prevent open SC terms.
Closes PR 15144.
2015-09-07 13:24:16 -05:00
Alexis King
c48abf6dff Fix typo in generated contract for Nonpositive-Integer 2015-08-29 16:41:10 -07:00
Vincent St-Amour
584d01314e Use math/flonum instead of unstable/flonum. 2015-08-27 14:14:51 -05:00
Asumu Takikawa
f5f84c7625 Fix for*/fold and for*/lists
Only parse and use the type annotations if they are present on
all fold variables. This matches the default for other forms in TR.
Also, this will usually result in a "insufficient type information"
message which is more helpful than if TR chose some default type.

Closes PR 15138
Closes PR 14893
2015-08-25 11:44:24 -04:00
Asumu Takikawa
20f3badc98 Enable prefab support correctly for define-struct
I had forgotten to adjust the define-struct macro to work
like the struct macro for the #:prefab keyword, which made
TR think prefabs were ordinary structs.

Closes GH issue #188
2015-08-21 16:38:04 -04:00
AlexKnauth
0037a0277f allow values with define-new-subtype types as functions 2015-08-15 19:00:35 -05:00
AlexKnauth
efb877dbfb fix inference with define-new-subtype 2015-08-15 14:36:45 -05:00
AlexKnauth
af2c22f542 Add error message specifications 2015-08-14 21:42:21 -05:00
AlexKnauth
f8cc9e8dcd fix issue #169 2015-08-14 21:42:20 -05:00
Asumu Takikawa
94ce4b203e Use tc-expr for top-interaction functions instead
This restricts operations like `:print-type` to only
work on expressions. This seems like a reasonable
restriction and simplifies the implementation.
2015-08-14 21:25:54 -04:00
Vincent St-Amour
e997f02095 Rewrite compound pair operation optimization.
Previous version replaced calls to, e.g., `cadr` with calls to `cdr`
then `car`, called the typechecker to populate the type table, then
optimized the exploded operations. The call to the typechecker failed
on open terms, limiting the applicability of the optimization, and was
just generally brittle.

The new version instead explodes operations, then optimizes them inside
out for as long as the argument's type guarantees it's safe. This works
on open terms, and should be more robust.
2015-08-14 17:28:47 -05:00
Asumu Takikawa
509f1aa20c Update type for copy-directory/files 2015-08-14 01:02:54 -04:00
Asumu Takikawa
4f050888e2 Export let*-values from TR correctly
Closes PR 14997
2015-08-12 12:16:05 -04:00
Asumu Takikawa
29144c7932 Fix handling of let rhs that don't return
In the case that a let rhs doesn't return and therefore the
bodies of the let are unreachable, the bodies need to be marked
as ignored for the optimizer.

In addition, don't attempt unboxed let optimization at all
if the return type is Nothing since it probably means some
body expressions have no type.

Closes GH issue #165
2015-08-11 12:07:27 -04:00
Asumu Takikawa
6512b52b1d Fix polymorphic recursion check for type aliases
The old check was broken for cases with type constructors
with more than one type argument and was also too conservative
in some cases (e.g., when one cycle refers to another cycle of
 aliases in a non-recursive manner).

The new check is still conservative, but it allows more types
than before.

Closes GH issue #157
2015-08-07 19:05:13 -04:00
Vincent St-Amour
5b986d7d38 Update base dependency version. 2015-08-05 13:13:50 -05:00
Vincent St-Amour
f6779f2cfa unstable/macro-testing -> syntax/macro-testing 2015-08-05 13:13:50 -05:00
AlexKnauth
cf4a033872 fix issue #166 2015-08-03 18:36:14 -05:00
AlexKnauth
0c1d58a07b handle define-new-subtype in earlier phase 2015-07-30 23:24:17 -04:00
AlexKnauth
a58c2e317f add define-new-subtype
inspired by haskell newtypes
http://www.mail-archive.com/racket-users@googlegroups.com/msg27118.html
https://www.haskell.org/tutorial/moretypes.html
2015-07-30 01:39:06 -04:00
Asumu Takikawa
d1e17b04e8 Add tests for PR 15026
Fixed on HEAD, possibly due to new expander

Closes PR 15026
2015-07-29 14:29:18 -04:00
Asumu Takikawa
3fffeeac5d Add a test for PR 14521
Started working since v6.2. Possibly due to the new macro
expander.

Closes PR 14521.
2015-07-29 13:55:49 -04:00
Brian Lachance
5e0e8ed713 Fix missing match cases when trying to bind AnyValues typed "results"
tc-toplevel has fixes for define's, tc-let-unit has fixes for let's
2015-07-29 11:44:29 -04:00
Brian Lachance
1e5bc30b95 Prevent -let-internal name from leaking to users
Because -let-internal wasn't rename-out'd, users would see its name in
syntax error messages. Adding #:context forces the error messages to be
phrased in terms of the given form.
2015-07-29 11:07:54 -04:00
Vincent St-Amour
0a7ec21df9 Rename open-place to place/context. 2015-07-28 16:15:08 -05:00
Asumu Takikawa
91279f46c7 Add types for recent functions moved from unstable 2015-07-28 14:49:26 -04:00
Asumu Takikawa
2819a62b30 Add types for new syntax operations 2015-07-27 17:15:54 -04:00
Vincent St-Amour
36a8eb2b53 Remove dependency on unstable/open-place.
Instead use open-place from racket/place.
2015-07-23 11:48:39 -05:00
Sam Tobin-Hochstadt
5cd5f772d6 Don't allow promises created with delay/name as (Promise T).
Since these promises re-evaluate their bodies every time they
are forced, allowing them makes `force` not idempotent and not
safe to treat as a path.

This change is slightly backwards-incompatible, since programs
that previously passed `delay/name` promises across the typed
boundary will now fail at runtime. The alternative is also
incompatible: stop treating `force` as a path. Since `delay/name`
is quite obscure, this approach seems like the safer choice.
2015-07-22 14:22:34 -04:00
Vincent St-Amour
28c9bdf37b Fix base version dependency. 2015-07-20 16:17:39 -05:00
Vincent St-Amour
f35b5a9182 check-duplicate -> check-duplicates 2015-07-20 16:17:39 -05:00
Vincent St-Amour
72fb041211 Replace uses of unstable/function and /list with the equivalent core libs. 2015-07-20 16:17:39 -05:00
Matthew Flatt
1842aaa2bd fixes for some tests
The `identifier-binding` function is now senstive to the "macro
introduction" scope that's on an indentifier provided to a currently
expanding macro. Unit tests for TR need to use
`syntax-local-intorduce` to remove it, in the same way that `tc-setup`
already does.

Also, recognize a class expansion when it's wrapped with
`#%expression`, since `class` now expands that way sometimes.
2015-07-16 08:40:35 -06:00
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