added error handling in typeinference
popagating errors through constraint generation and unification