More meaningful error messages in type inferrer