On Tue, May 6, 2014 at 3:30 PM, Neil Toronto <neil.toro...@gmail.com> wrote: > On 05/06/2014 12:17 PM, sa...@racket-lang.org wrote: >> >> samth has updated `master' from ad8d0629f8 to 6567ebff59. >> http://git.racket-lang.org/plt/ad8d0629f8..6567ebff59 >> >> =====[ 6 Commits ]====================================================== >> Directory summary: >> 70.7% pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/infer/ >> 8.3% pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/rep/ >> 4.6% pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/ >> 3.2% pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/utils/ >> 3.3% pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/ >> 7.3% >> pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/unit-tests/ >> >> ~~~~~~~~~~ >> >> f83950f Sam Tobin-Hochstadt <sa...@cs.indiana.edu> 2014-05-05 21:30 >> : >> | Refactor type inference to eliminate exceptions. >> | >> | This provides approximately 6% speedup on >> | `racket -l math/scribblings/math.scrbl` and about >> | 14% speedup on the `new-metrics` test. >> | >> | Mostly this involves threading #f through the whole >> | of the inference process. There are several new >> | macros in `typed-racket/infer/fail` which are useful >> | for comprehensively using Maybe-monad style >> | programming in Racket. Of particular note is `%`, >> | which satisfies (% f e ...) => (and e ... (f e ...)) >> | but with the obvious fixes. >> | >> | This commit also weakens several contracts which >> | caused the build of DrRacket and/or `math` to fail >> | when contracts were enabled. > > > This is great. Two questions. Why is the math *documentation* a good test > for the new monadic-style encoding of inference algorithms? (Because it > tries to evaluate expressions that fail to type?)
Because it's a program that spends a lot of time in typechecking. This change speeds up typechecking generally, not just when it fails. > Also, does the last > paragraph refer to using contracts within TR programs, or to using contracts > within the implementation of TR? The latter. Sam _________________________ Racket Developers list: http://lists.racket-lang.org/dev