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
This means new logging lines should not change the numbering of all existing
logs making diffs much cleaner.
original commit: f1b52be26ad8635bfa1d6bfe49e8e36780577a92
This is a temporary fix in the sense that the typed/mred
wrapper that this relies on is incomplete. Once the typed
racket/gui bindings are merged, a more complete
insert-large-letters will be checked in.
Closes PR 14362
original commit: 2295f71dbeb21b8ba3231d25cafb070d0be585dc
This unit test is broken due to an issue with using
the : form for external names in classes. Since : checks
if the id is bound, it doesn't work if there is an internal
name different from the external name (since only the
internal one is in scope in the class body).
Haven't decided whether to put annotations on internal
identifiers instead or to not run the check for class
member names.
original commit: fe811e33aaf50fe68ad2ff14a7c46685a03e1f19
This includes support for positional inits and also
init-rest along with make-object and instantiate.
original commit: 18182d16a615f5ecf7bed5428374010f609bb59e