Reordered goals in typeo for fast type inference/checking