Please sign in to comment.
propagate expected type info further down AST
Previously expected propositions were erased frequently (at lets and ifs) and checking for logical entailment was unidirectional instead of bidirectional. In other words, instead of checking if propositions held at the leaves of the AST, we would typecheck the AST and blindly propagate up ALL logical info we learned at each step. This meant that we would get exponential blow up of propositions even when we didn't care about their content. With this commit, instead now we send down expected types *and* propositions so we can verify expected types and propisitions are satisfied at leaves, thereby relieving the need to constantly report up huge amounts of logical info while typechecking.
- Loading branch information...
Showing with 304 additions and 147 deletions.
- +6 −6 typed-racket-lib/typed-racket/infer/infer-unit.rkt
- +16 −38 typed-racket-lib/typed-racket/typecheck/check-below.rkt
- +64 −45 typed-racket-lib/typed-racket/typecheck/tc-envops.rkt
- +23 −27 typed-racket-lib/typed-racket/typecheck/tc-expr-unit.rkt
- +26 −17 typed-racket-lib/typed-racket/typecheck/tc-funapp.rkt
- +18 −9 typed-racket-lib/typed-racket/typecheck/tc-if.rkt
- +3 −2 typed-racket-lib/typed-racket/typecheck/tc-let-unit.rkt
- +1 −1 typed-racket-lib/typed-racket/typecheck/tc-metafunctions.rkt
- +1 −0 typed-racket-lib/typed-racket/typecheck/tc-subst.rkt
- +1 −1 typed-racket-lib/typed-racket/types/prop-ops.rkt
- +40 −1 typed-racket-lib/typed-racket/types/tc-result.rkt
- +105 −0 typed-racket-test/succeed/slow-parser.rkt
Oops, something went wrong.