Separating typechecking and type error reporting in two passes?