plt/racket — pull request #440 by takikawa (2013-09-17 20:35:18+00:00)
Title: Improve type->contract error messages

This PR is for code review.

Here is an example of an improved `type->contract` error:

````
#lang typed/racket

(require/typed racket/base
[values (case-> (String -> String)
(Integer -> Integer))])
````

````
Type Checker: Type (case-> (String -> String) (Integer -> Integer)) could not be converted to a contract: function type has two cases of the same arity
````

I haven't added error messages for all causes of failures, but it's easy to add new ones. Just find occurrences of `(exit (fail))` and replace with `(exit (fail #:reason "failure cause"))`.