This allows us to type-check non-recursive sequences of
letrec-values clauses in the right order. In other words,
we will type-check the clauses in reverse topological
order (the reverse of the dependency order).
Clauses that are recursive go through the usual
type-checking process, injecting Undefined where necessary.
original commit: 93a2798ec3f41e113a282e10c31473d117f590e5
Split into two passes in order to be able to find
more cases where the RHS doesn't refer to the bindings
in the letrec.
Closes PR 13124
original commit: bdb8833fa501a068f8fcebcf89cbf7c071a6c9c6
The types for racket/gui are substantially complete, but
there are still some missing classes and methods.
Some interesting future work would be to ensure type coverage
by comparing the class members vs. the types in the environment.
That could be run as a test to ensure it stays up to date.
Most types for the framework library are still missing.
original commit: 00a3b7cb149ae35c63b9eb64df34d87424407a10
This expands the `Name` type functionality to go
beyond struct names and allows arbitrary recursive
type aliases to use the environment for indirection.
In addition, such aliases can be mutually recursive.
original commit: a8cc430d0fc7090dd758e0f6738296edcb4d8490
Make sure to check that by-name inits are actually accepted
by the superclass and produce a good error when they aren't.
original commit: b0ba3272cb7dadba24b0bcba73128bef3f312d06
Instead of making separate passes over the expressions,
make a single pass to collect necessary information for
type-checking.
This enables simpler processing of type annotations,
super initialization arguments, and other things.
original commit: 0bacba7a68321ff08187d0a5d95b02b8351cdd3f
This commit allows definitions without type annotations
to refer to definitions later in a module that do have
type annotations. For example,
(define (f x) (g 0))
(: g (-> Integer Integer))
(define (g x) (add1 x))
Previously, such cases required shuffling type annotations
and/or definitions around to satisfy the type-checker.
Note that typechecking may still depend on ordering when
there are not enough type annotations in the code.
Closes PR 11544
original commit: 343ac526073ab8c2520399316e5391452f3f7dc0
The matching was too inclusive in some cases, causing
spurious optimizations (or type-table lookup failures).
Closes PR 14380
original commit: 07bde5063b5a3a83f61e85f00a1c6ce6e0a097d2
The domains in a row polymorphic function weren't checked
properly when row inference was used.
original commit: 32f09c35705206a281fcd1f02b968c7ad02ece69
Some forms like `define` do not produce a value
and thus do not have a type. Instead of returning
the #<void> value for these cases, return the symbol
'no-type.
Also fix printing in several places to reflect this.
Fixes a regression due to commit 00470e3 and also
fixes an unreported bug with (:print-type ...) on
non-expressions.
Closes PR 13758
original commit: 1747b700976a664ec7ee5a9004e02a173910a2e2
Rolling this forward because the math library is no longer dependent on
the broken behavior. Also nothing in the main repo seems to depend on
this.
original commit: 0a81627eca8233edca95368938c739a9d268407f
This is helpful for typechecking forms that lift
expressions such as object instantiation or contracted
values when they are used at the top-level.
It's not normally an issue for typechecking modules
because lifting is delimited by the module extent so that
normal local-expansion will cover it.
original commit: 00470e3e1a09f88a32c6b20682b577669655a2c4
flreal-part only is valid on float-complex numbers and the code in
float-complex.rkt already covers it.
original commit: 5f636af86ad3cb7a4bb462c90c099ba3b662438f
The unsafe operation didn't return the same result as
the safe operation, meaning any checks related to type keys
were giving the wrong result. As a result, some subtyping
clauses were not triggered.
original commit: 7907320733b6d29b2382e016c10888acbf4e1c67
The match expander calls `resolve` during subtyping, which
is a problem for types that recur through the environment like
Struct types because it doesn't coordinate with the cache
for subtyping.
Closes PR 14364
original commit: 7585581f00a40f59d5f29159622a10640cfbdec9