[racket-dev] [plt] Push #28684: master branch updated

From: Neil Toronto (neil.toronto at gmail.com)
Date: Tue May 6 15:30:29 EDT 2014

On 05/06/2014 12:17 PM, samth at 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 <samth at 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?) Also, does 
the last paragraph refer to using contracts within TR programs, or to 
using contracts within the implementation of TR?

Neil ⊥


Posted on the dev mailing list.