plt/racket — pull request #534 by takikawa (2014-01-07 16:39:31+00:00)
Title: Add pretty printing for Typed Racket types

This PR adds pretty printing for TR types. Since this relies on an earlier PR that changes the error message format, those commits are included too (so that PR should be merged first). The last four commits are the relevant ones.

Pretty printing is enabled by rewriting the printer to emit s-expressions as an intermediate format and then pretty printing the s-expression. IMHO, this also makes the code easier to understand than the old side-effecting style and also makes it easier to implement alternative printing styles.

A few printing behaviors that I think are bugs have been changed too. For example, the singleton type for the character `#\a` is currently printed by TR as `a`. I changed this to print as `#\a`.