Improve type checker returning bound variables and synthtized type