Record partial type inference info

Proof search now has access to this and can fill in some basic type
information. Lots still to do though (especially dealing with type
classes, properly spotting errors, and polymorphic type variables).